Delete query (1 Viewer)

w0od0o

Registered User.
Local time
Today, 11:20
Joined
Jan 13, 2009
Messages
87
Hi, i am try to create a delete query that will delete selected records, i have a jobs table with various data and a "select" check box, i have created a delete query where it will delete any record based on contract number and if select is ticked but i cant get it to find the selected records.

would the correct expression be:

where:
forms!contract!select = "yes"?

many thanks

If your have a suggestion for an alternative method i would also be grateful

w0od0o
 

John Big Booty

AWF VIP
Local time
Today, 20:20
Joined
Aug 29, 2005
Messages
8,262
In the criteria under the check box use -1 or "True" (if you use "True" the quote marks are required).
 

w0od0o

Registered User.
Local time
Today, 11:20
Joined
Jan 13, 2009
Messages
87
thanks for your quick reply, it seems to work but a little bit random and i think its something to do with the records not being saved or the "select" data when selected not updating before i click to run the delete query, is there some way of store the data when i click the button?

thanks

w0od0o
 

John Big Booty

AWF VIP
Local time
Today, 20:20
Joined
Aug 29, 2005
Messages
8,262
I think that if you put Me.Refresh as the first line in your On Click event (or at any point prior to running the query), that should force the change to be stored.
 

Users who are viewing this thread

Top Bottom