AndyCompanyZ
Registered User.
- Local time
- Today, 13:14
- Joined
- Mar 24, 2011
- Messages
- 223
I have a update query running from the afterupdate on a cascading combobox which is really throwing me. The query is very basic:
INSERT INTO tblEvent ( VenueRoomID )
VALUES (Forms!frmEvent!cmboVenueRoom);
but it gives me the above error. I have checked all the usual violations like required field indexing etc. but none are set. The other issue is that if I allow the update anyway (by saying yes to the question if I want to run the query anyway) it does update the table. However when I go back to the form with the same record it deletes it from the table. I presume this is something to do with the combobox requerying each time. I also have a field on the form which should show the record that has been already saved in the table with the control source of VenueRoomID this fills in when I select the room in the combobox but disappears when I return to the form for the instance of the Event because the table entry is cancelled by the combobox. Can anyone tell me what i am doing wrong please.
INSERT INTO tblEvent ( VenueRoomID )
VALUES (Forms!frmEvent!cmboVenueRoom);
but it gives me the above error. I have checked all the usual violations like required field indexing etc. but none are set. The other issue is that if I allow the update anyway (by saying yes to the question if I want to run the query anyway) it does update the table. However when I go back to the form with the same record it deletes it from the table. I presume this is something to do with the combobox requerying each time. I also have a field on the form which should show the record that has been already saved in the table with the control source of VenueRoomID this fills in when I select the room in the combobox but disappears when I return to the form for the instance of the Event because the table entry is cancelled by the combobox. Can anyone tell me what i am doing wrong please.