W
Wayne-I-M
Hi
I am looking to append a new record to a joining table (TblBookings)
TblClients (Primary = ClientID)
TblTrip (Primary = TripID)
tblBookings
BookingID
ClientID
TripID
This does not work :-(
Private Sub ButUpdateBooking_Click()
'save record'
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'this is section that causes the problem'
DoCmd.RunSQL "INSERT INTO [tblbookings] Set [TripID] =" & Me.TxTTripID
DoCmd.RunSQL "INSERT INTO [tblbookings] Set [ClientID] =" & Me.txtClientID
'other form requery'
Forms![frmAddNewMember]![frmAddNewMember_List].Form![MembersList].Requery
End Sub
the 2 unbound boxes (starting txt) are filled with other code and work fine.
Obviously the INSERT INTO is not working - any ideas please
Thanks for any tips
I am looking to append a new record to a joining table (TblBookings)
TblClients (Primary = ClientID)
TblTrip (Primary = TripID)
tblBookings
BookingID
ClientID
TripID
This does not work :-(
Private Sub ButUpdateBooking_Click()
'save record'
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'this is section that causes the problem'
DoCmd.RunSQL "INSERT INTO [tblbookings] Set [TripID] =" & Me.TxTTripID
DoCmd.RunSQL "INSERT INTO [tblbookings] Set [ClientID] =" & Me.txtClientID
'other form requery'
Forms![frmAddNewMember]![frmAddNewMember_List].Form![MembersList].Requery
End Sub
the 2 unbound boxes (starting txt) are filled with other code and work fine.
Obviously the INSERT INTO is not working - any ideas please
Thanks for any tips