Solved

Update data on form based on subform

Posted on 2008-10-31
5
445 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

Independent Software Vendors: 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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

626 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