Update Query & Yes/No Field

G

Guest

Hi - I am working with Access 2003.

I have a field with the "Yes/No" format.

Is there a statment I can time in an Update query which will place a check
mark for Yes? I tried the following statement:

UPDATE [Purchased] SET [Lotus Tealight] = Is Not Null;

And received the following error message:

Syntax error (missing operator) in query expression 'Is Not Null'.

I have a query with close to 1200 records (the database itself has 5000
records) which need to be checked Yes as to purchasing a specific item and I
really do not want manually check each record.

Thanks!
 
G

Guest

I assume you are trying to update the records which aren't null.

UPDATE [Purchased] SET [Lotus Tealight] = Is Not Null;

In this situation access still doesn't know what to do.

try:
UPDATE [Purchased] SET [Lotus Tealight] = -1
WHERE ([Lotus Tealight]) Is Not Null);


this will update the field lotus tealight to yes where the field tealight =
null.
If it must be another field that has to be updatet refer to thate field with
the SET.

hth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top