autonumber

T

Tony Palermo

I have created a table and would like to have the
autonumber in their to use for a sort. there are 5
columns in the table one of which is the autonumber which
is in the last spot. i just want to know if there is a
way to insert into the table the other 4 variables
without having to physically send the autonumber too. i
have tried the following statement and it did not work.
please help

insert into tablename (column1, column2, column3,
column4) values (variable1,variable2,variable3,variable4)
this will not work cause the autonumber is the fifth
column and i am not passing any value for it. please
please help
 
T

TC

The next available value of the autonumber will be created automaticaly. You
do not have to send it in there.

Why did your INSERT statement not work? Show us the statement code, & the
error number & message you got.

HTH,
TC
 
T

Tim Ferguson

i just want to know if there is a
way to insert into the table the other 4 variables
without having to physically send the autonumber too.

No: the "auto" part of Autonumber means that it provides the next number
automatically. If you really want to remove a value from an autonumber
field (i.e. set it to Null), you can probably do it with an UPDATE query,
although I am sure you cannot do it in the UI or with vba code.

Mind you, I cannot imagine why you would want to do this. The only thing
that an AN does is to provide a unique number for each record. If you set
the value to "unknown" (which is what Null means), then it won't be unique
any more.

More information please?


Tim F
 

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