Help with two forms

ATB

Registered User.
Local time
Today, 11:32
Joined
Dec 7, 2000
Messages
30
I have a form which shows me my chosen customers details and a subform listing all jobs performed for the customer. You select the job in question from the list and this opens a 2nd for giving details of the job. This works well until i want to add a new job. as soon as the 2nd form moves to a new record it resets the customer id field back to 0 and i have to retype the correct customer ID for the update to work. My question is how can i make this field use the current customer id for new recoords.

Thanks
 
If the first form remains open with the CustomerID you want then in the new form you can put code like this in the On Current event:

If Me.NewRecord Then
Me.CustomerID = [Forms]![Form1Name]![CustomerID]
End if
 
Thanks, but can't seem to get this working.

The 1st form does remian open but not active, does this matter? I have put the code but still doesn't seem to post the customer id in the field when adding a new record. Any other idea's

Cheers
 

Users who are viewing this thread

Back
Top Bottom