RobertIngles
Technical User
I have been working on this for 3 straight hours!
Form1 is using an unbound field to check for a record match in TBLUser. If no match found, user can open Form2 to create a new record. OnClose, I need Form2 to pass the UserID velue back to Form1. This is not happening and to make things worse, when I try to close Form2 I get the "PK cannot be blank". The PK field on Form1 isn't filled in until the new record is created in Form2 and the PK in Form2 is the value I want to pass back to Form1. I swear this code worked on another form - can anyone see what I have done wrong??
Private Sub Form_Close()
Forms!FRMCreateNewLaptopandUserv4!LaptopUserID = UserID
End Sub
Form1 is using an unbound field to check for a record match in TBLUser. If no match found, user can open Form2 to create a new record. OnClose, I need Form2 to pass the UserID velue back to Form1. This is not happening and to make things worse, when I try to close Form2 I get the "PK cannot be blank". The PK field on Form1 isn't filled in until the new record is created in Form2 and the PK in Form2 is the value I want to pass back to Form1. I swear this code worked on another form - can anyone see what I have done wrong??
Private Sub Form_Close()
Forms!FRMCreateNewLaptopandUserv4!LaptopUserID = UserID
End Sub