General discussion

Locked

Access 2000 Combo Box

By RDeen ·
I am trying to code a combo box with the event procedure recorded "On Not In List". I have code that will work if the table I'm writing to doesn't have a primary key. But if I try and use it on a table with a primary key, it will automatically add the auto number as one field each time I try to create a field. In other words I end up with the field I created and a field that is the next auto number. So. Hopefully someone encountered this problem and can shed some light on the frustration I'm suffering! Thx.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 2000 Combo Box

by Bob Sellman In reply to Access 2000 Combo Box

Based on your description, when a new row is created in the lookup table (used for the combo box), a value is also automatically put in the autonumber column, which is what should happen. The table would have in that case at least two columns, one being the autonumber column (to which you cannot add any values). So this does not appear to be a problem based on your description.

However, if the lookup table only has one column and you want that column to be the primary key, you have two options:

1. Each time a new row is added the autonumber column automatically sets the value.

2. Set the primary key column as a number instead of autonumber. This will limit new records to unique values, but allow you to enter whatever new numbervalue is appropriate, rather than the next number as determined by the autonumber function.

If this doesn't answer your question, provide some additional information, including the table layout and samples of existing data and data to add. This may make your problem easier to understand (and solve).

Collapse -

Access 2000 Combo Box

by RDeen In reply to Access 2000 Combo Box

Poster rated this answer

Collapse -

Access 2000 Combo Box

by RDeen In reply to Access 2000 Combo Box

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums