RobertIngles
Technical User
I know this is a dumb one but I can't find it in my refernce books
I have a form that the user enters a alphanumeric value into the first field. They click a control button - if the value does not exist in the corresponding table a popup prompts them to create a new record (works perfectly thanks to help from this forum).
If the value does match a corresponding record in the table when they click, I want to automatically fill in the remainder of the vacant fields in the active form and move the cursor to the next field. The form is based on a query ("QRYNewBookingV2") made up of two joined tables - 'TBLLaptop' and 'TBLUser' with the "UserID" as the joined columns. The data needed to retrieve is in the TBLLaptop column "EncryptionStatus" In simple terms if the record exist the Else statement I am trying to construct is as follows..
Else
Forms!FRMNewLaptopBookingV2!EncryptionStatus = Table!Laptop!EncryptionStatus
Me.UserID.SetFocus
End If
End Sub
I get no errors, it just doesn't fill the vacant fields in.
Qustion one: Is my syntax referring to the table correct?
Question two: Should I be referring to the query and if so what is the syntax? Query!QRYNewBookingV2!EncryptionStatus ?
As always, thanks for your help!
Robert
I have a form that the user enters a alphanumeric value into the first field. They click a control button - if the value does not exist in the corresponding table a popup prompts them to create a new record (works perfectly thanks to help from this forum).
If the value does match a corresponding record in the table when they click, I want to automatically fill in the remainder of the vacant fields in the active form and move the cursor to the next field. The form is based on a query ("QRYNewBookingV2") made up of two joined tables - 'TBLLaptop' and 'TBLUser' with the "UserID" as the joined columns. The data needed to retrieve is in the TBLLaptop column "EncryptionStatus" In simple terms if the record exist the Else statement I am trying to construct is as follows..
Else
Forms!FRMNewLaptopBookingV2!EncryptionStatus = Table!Laptop!EncryptionStatus
Me.UserID.SetFocus
End If
End Sub
I get no errors, it just doesn't fill the vacant fields in.
Qustion one: Is my syntax referring to the table correct?
Question two: Should I be referring to the query and if so what is the syntax? Query!QRYNewBookingV2!EncryptionStatus ?
As always, thanks for your help!
Robert