I use SQL Server, but I believe the principle is the same. You won't get the
autonumber value until the record is saved. Since it's not generated by Jet,
Jet can't anticipate what its value will be, and can't display it until it
gets it from the back end engine.
One thing you can do as a workaround is to create the record first, and then
bring the user into it. In other words, instead of just going to a new
record, create a new record in code, get that autonumber value, requery the
form, and then go to the new record for the users to input the other fields.
The users might not like that, as they might just be used to going to the
"new" record; but it may be the way you need to do it if you want to display
the number before the record is edited and saved by the user.
Or, if the issue is that the users are getting confused by there not being a
number, then simply hide or disable that field until a value appears in it,
or something to that effect.
"Simon" <S.*******@shos .co.ukwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
>I had an access database that i use as an ordering system. I have a
form for entering customer details. When i add a new customer on the
form the customer number is an auto number that appears when i type in
the details.
I have just moved over to mysql server with access as the front end. I
have setup the sql tables with the customer number as autonumber.
When i go into the form and add a new customer it does not generate the
customer Number automaticaly on the form like it did before. once i
have entered all the data and saved it i went into the customer table
to see if the data was saved the auto number was in there .
Is there any way for on the form for the autonumber to be displayed
when i start entering the data. Like how it was when i used access as
the back end before i moved to mysql as the back end
Any help would be great
Simon