Update By Auto Num

N

NotGood@All

I have a table that has an auto number named recordnum, I want to update a
blank field F3, using this code; UPDATE test SET test.F3 = "2Q 06 Box 01"
WHERE ((("recordnum")>="2" And ("recordnum")<="95")); but I get 0 records
 
J

Jeff Boyce

Have you tried running just a plain SELECT query to see if you get any
records?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jeff Boyce

P.S. Autonumbers are numbers.

You appear to be comparing them to strings (e.g. "2").

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
N

NotGood@All

Jeff, thanks. I tryed running a select query first and I got my 95 records,
I used >=2 and <=95 and got a Data type mismatch in criteria expression
 
J

Jeff Boyce

That doesn't sound like an Autonumber field, then.

Can you confirm in the table that the field is an Autonumber data type?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

I have a table that has an auto number named recordnum, I want to update a
blank field F3, using this code; UPDATE test SET test.F3 = "2Q 06 Box 01"
WHERE ((("recordnum")>="2" And ("recordnum")<="95")); but I get 0 records

The TEXT STRING "recordnum"? You want the fieldname recordnum. And the
criterion should NOT have quotes around it - the text string "12551" is in
fact less than the text string "2".

Try

UPDATE test SET test.F3 = "2Q 06 Box 01" WHERE ((([recordnum])>=2 And
([recordnum])<=95));
 

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

Top