Solved

Update data on form based on subform

Posted on 2008-10-31
5
444 Views
Last Modified: 2013-11-28
I am completing an in-house developed Access system which will be used as our Courier Dispatch Ticket system.  The Main form allows the user to input the information about a call.  There is a continuous subform that updates based on a timer that displays the dispatch tickets entered for the cureent day.  The records on the subform are color coded based on criteria in the record.  For example, records that have been assigned are green.  If there is no courier assigned, the record is blue.  If the courier has completed the delivery, the record is white.  As information is entered on the Main form, the subform is updated appropriately.  This is working fine.  
Now the manager of the Couriers would like to be able to click on an entry on the subform and have the data associated with that record displayed on the main form.  Is there a way to do this?    I've attached a screen shot of the form to help better explain what is desired.
Update-main-form-based-on-subfor.doc
0
Comment
Question by:kshumway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
LennyGray earned 500 total points
ID: 22853264
When the user double-clicks (use double-click so that it is an intentional user command) on a data control (it must be enabled) on the subform, the OnDoubleClick event would fire and call the "Look Up Ticket by..." OnClick Function in the main form.

The main form command button private function would have to changed to a public function. Then you would call the main form function by coding:

Forms("Form1").TheAppropriateLookupCommandButton_OnClick

Good Luck !!
Lenny Gray
0
 
LVL 10

Expert Comment

by:LennyGray
ID: 22853274
Of course, you would have to pass the index of the record in the subform to the main form so that the OnClick would look for the correct data.
0
 

Author Comment

by:kshumway
ID: 22853286
Thank you.  I'll try that out!
0
 

Author Comment

by:kshumway
ID: 22854731
I am having a problem with the syntax to invoke the onClick event of the button on the parent form.  This is an Access 2003 application.
0
 
LVL 10

Expert Comment

by:LennyGray
ID: 22854867
try:

Call Forms("Form1").TheAppropriateLookupCommandButton_OnClick()

If it does not work send me the mdb and I'll make it work for you.

Lenny
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question