Here is my goal:
I have two forms with an command button on the primary that opens the secondary form with the current record ( "roomId" ) on the primary and secondary. The primary form name is: "frm-room" with roomID as the primary key. I want it to set a value to the secondary form "frm-presenter" if a match is not made.
Below is the code I'm using to open matching records on the forms.
DoCmd.OpenForm "frm-presenter" , acNormal, , "roomId=" & Me.roomId
If it matches the number great but if the number is not found then I need it to set the value of the primary ( "roomId" ) with the secondary ( new record ) ( "roomId" )
Any suggestions would be appreciated!
Tony
I have two forms with an command button on the primary that opens the secondary form with the current record ( "roomId" ) on the primary and secondary. The primary form name is: "frm-room" with roomID as the primary key. I want it to set a value to the secondary form "frm-presenter" if a match is not made.
Below is the code I'm using to open matching records on the forms.
DoCmd.OpenForm "frm-presenter" , acNormal, , "roomId=" & Me.roomId
If it matches the number great but if the number is not found then I need it to set the value of the primary ( "roomId" ) with the secondary ( new record ) ( "roomId" )
Any suggestions would be appreciated!
Tony