I am attempting to open a repair order to create an estimate for a customer who is having his/her vehicle worked on. the following is a sketch of the form that creates the invoice:
1. There is a parent form that allows the user to enter DateIn, DateOut, MilesIn, Miles Out, etc
2. There is a subform that permits the user to enter the parts needed for the repair.
3. There is a subform that allows the user to identify the items that need repair - turn rotors, oil change, replace front brake pads, etc.
4. This subform has the customer contact data and vehicle information.
It appears to be item 4 above that is giving me the trouble. When a new record is created, I want frmJobSub (Item 4 above) to automatically load the customer contact info and vehicle info. See code below. The result that I am expecting is that when the user clicks the button that opens the new invoice/record, I am expecting the test for a new record to be true and the program to execute the If-Then code, but it is not.
Although I am looking at a new record, could someone please assist me in determining why the new record is not being recognized by the program?
Thanks in advance.
Private Sub Form_Current()
If Me.NewRecord Then 'And Not IsNull(lngpvtCustomerID) Then
lngpvtCustomerID = Forms!frmCustomerContactData.CustomerID
'Look up the cust fields
Me.lblFullName = DLookup("FirstName", "tblMasterCustomer", "CustomerID=" & lngpvtCustomerID & " ")
'Save these entries
'Clear the variable
lngpvtCustomerID = Null