Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Update data on form based on subform

Posted on 2008-10-31
5
Medium Priority
?
446 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

688 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