Update By Auto Num

  • Thread starter Thread starter NotGood@All
  • Start date Start date
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
 
Have you tried running just a plain SELECT query to see if you get any
records?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
P.S. Autonumbers are numbers.

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

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
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
 
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
 
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));
 
Back
Top