WalkieTalkie
Technical User
I want a form to go to a new record, and fill in the ID from another form that is open at the same time. There are two forms that this form can take the ID from so I have been trying to use the IsLoaded function to determine which form is open. Here is my code:
It will only work if I take out the IsLoaded. Any ideas why this is not working? Thanks in advance.
Code:
DoCmd.GoToRecord , , acNewRec
If IsLoaded("fmNewBooking") Then
Me![ClientTourID] = Forms![frmNewBooking]![ClientTourID]
End If
If IsLoaded("fmEditBooking") Then
Me![ClientTourID] = Forms![frmEditBooking]![ClientTourID]
End If