09-15-06, 12:32 #1Registered User
- Join Date
- Jul 2006
Unanswered: Copy value from subform1 to subform two when all are open
There are two continuous subforms in main form. All are linked with ticketNum. When user comes to subform2. I need that Field3 of subform2 will automatically filled with field2 (field2 is a textbox) of subform1. Field3 is a listbox where i need that user has to select single or multiple values. control which i am using is a listbox in field3. How to i do that needs help.
09-15-06, 12:44 #2Moderator
- Join Date
- Dec 2004
- Madison, WI
In regards to Field3 of subform2, you can possibly put in the GotFocus event of subform2 some vba code such as:
If not isnull(Forms!MainForm!SubForm1.Form!Field2) then
Forms!MainForm!Subform2.Form!Field3 = Forms!MainForm!Subform1.Form!Field2.
I think that's the right syntax but I'm not sure since Field3 is a listbox and it might depend on what is the bound column. I think you may need to use the .itemselected or .selected syntax somewhere but I'm not sure....someone else?Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)