Microsoft
Software
Hardware
Network
Question : How to generate autonumber value on add new record
Hi Guys,
Hoping you can help me out. I have a form to enter a new record in a table. The primary key of the table is a long integer autonumber field. I set the form to DataEntry "yes" to it opens blank. Which means it does not populate that autonumber field with the next value. I added a command button at the bottom to add the record. However, whenever clicked, I get an error because obviously the autonumber field is still null and is required and not allowed to be null. I have tried many of the solutions I have found here, but no dice. Any idea how I can put the next increment of that autonumber field in there before it attempts to add the new record to the DB? Thanks.
Answer : How to generate autonumber value on add new record
You cannot set the AN in code. It's not the AN that is creating the error, it's some other Required field in your table.
mx
Random Solutions
view table relationships graphically sql server 2000
Should I use SqlDataSource or SqlConnection (which is better)
How to make a PC a thin client?
prevent user to save worksheet
type mismatch with this statement
WSUS for IT outsoursing clients (one WSUS for few companies)
The expression you entered contains invalid syntax.
Driver for Maxtor One Touch III
Terminal Server 2000 - disabling and/or capturing disconnecting
In-place upgrade of Hyper-V Server 2k8 R2 to Full Server 2k8 w/Hyper-v role