AutoNumID doesn't work

M

Mark

I am having a problem with Access 2000 not autofilling the id of a new record
in a form. First a customer(customer table) is selected from a combo box and
the addresses (customer address table) are linked as a subform. Once the
user selects the customer the addresses that have been previously entered are
displayed. When they try to enter a new address, error messages are a
plenty. One error message states that you can't enter a null in a primary key
field. I am developing this app in Access 2003 and I did not realize this
would be a problem in Access 2000. I was wondering if it could be a
reference issue. Any suggestions would be appreciated...
 
D

Dirk Goldgar

Mark said:
I am having a problem with Access 2000 not autofilling the id of a
new record in a form. First a customer(customer table) is selected
from a combo box and the addresses (customer address table) are
linked as a subform. Once the user selects the customer the
addresses that have been previously entered are displayed. When they
try to enter a new address, error messages are a plenty. One error
message states that you can't enter a null in a primary key field. I
am developing this app in Access 2003 and I did not realize this
would be a problem in Access 2000. I was wondering if it could be a
reference issue. Any suggestions would be appreciated...

It sounds like the problem is in the subform linkage or in the design of
the recordsource table or query of the subform. Please post the Link
Master Fields and Link Child Fields properties of the subform control,
and give the details of the tables or queries involved, identifying
which fields are primary keys and which are foreign keys.
 
M

Mark

ok.. I will try to do that later today. After re-reading my question I don't
believe I made one interesting point very clear. The autofill of the
autonumPK that doesn't work in Access 2000 works in Access 2003. There are
no error messages and it works exactly as I had expected it to.
Unfortunately, all the users only have Access 2000 to run this app. Also
this is an Access Project with a SQL Server backend.
 
D

Dirk Goldgar

Mark said:
ok.. I will try to do that later today. After re-reading my question
I don't believe I made one interesting point very clear. The
autofill of the autonumPK that doesn't work in Access 2000 works in
Access 2003. There are no error messages and it works exactly as I
had expected it to. Unfortunately, all the users only have Access
2000 to run this app. Also this is an Access Project with a SQL
Server backend.

The fact that it's an ADP could be significant, but I'm not that familar
with ADPs. Please do post the information I asked for, but also note
whether there's anything different about the SQL Server database that
you're using. Are both versions using the exact same database?

It could be something as simple as a broken reference in the Access 2000
version. Have you checked the references? In the VB Editor
environment, click Tools -> References... and look through the list for
any reference marked as MISSING.
 
M

Mark

No references are MISSING, but I did notice that Access 2000 uses Microsoft
Access 9.0 Object Library and Access 2003 uses "Microsoft Access 11.0 Object
Library". I attempted to copy this to the correct directory and change the
references in the Access 2000, but the new reference did not show up in the
browse.
 
D

Dirk Goldgar

Mark said:
No references are MISSING, but I did notice that Access 2000 uses
Microsoft Access 9.0 Object Library and Access 2003 uses "Microsoft
Access 11.0 Object Library". I attempted to copy this to the correct
directory and change the references in the Access 2000, but the new
reference did not show up in the browse.

I don't follow you. Did you try to copy the Access 11 (2003) Object
Library and make Access 9 (2000) use it? That would be a bad thing to
do. Or are you saying that Access 2000 was trying to use the Access
2003 library? That should have been automatically adjusted to reference
the Access 9.0 Object Library, but if it wasn't, that could be the
problem.

Do you have both Access 2000 and Access 2003 installed on the same PC?
If so, you must make sure that you install them in separate folders.
Ideally, you'd have installed Access 2000 first, and Access 2003 second,
but not doing so may not cause you any problems.
 
Top