Format of AutoNumber

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have changed the format of an autonumber field to place GN- before it, for
example GN-1, GN-2.....and so on. This works fine in this table. I would like
this as a combo box in another form and it is linked to the other table
through a 1-many relationship, but when the combo list is selected the GN-1
is shown in the drop down menu but cannot be selected. The corresponding
field for the combo box is a number field to take the autonumber but it
doesnt seem to like the GN before it and says its the wrong format.
Can anyone help?

Chris
 
Autonumber fields exist for one purpose only: to provide a (practically
guaranteed) unique value that can be used as a primary key. What value is
has shouldn't matter to you (and, in fact, it's generally recommended that
the autonumber field not be displayed to the end users)

You need to recognize that changing the format of a field only changes how
it's displayed, not what value is stored. Presumably your table still
contains 1, 2, 3, not GN-1, GN-2, GN-3, so you need to join based on the
number only.
 
Chris said:
I have changed the format of an autonumber field to place GN- before
it, for example GN-1, GN-2.....and so on. This works fine in this
table. I would like this as a combo box in another form and it is
linked to the other table through a 1-many relationship, but when the
combo list is selected the GN-1 is shown in the drop down menu but
cannot be selected. The corresponding field for the combo box is a
number field to take the autonumber but it doesnt seem to like the GN
before it and says its the wrong format.
Can anyone help?

Chris

It is generally a poor idea to use an autonumber anywhere someone may
see it. It confuses the heck out of people who don't know. It will tend to
skip numbers or do other strange things. If you want consecutive numbers
that mean something to real people, then I suggest not using autonumbers and
creating the number (and letters if you like) programicly.
 

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

Similar Threads


Back
Top