Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form1 coded to pass field value to Form2 on close not working - HELP

Status
Not open for further replies.

RobertIngles

Technical User
Jan 20, 2011
113
CA
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

 
Fixed it, I was referring to the wrong form - over and over and over again - STUPID!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top