Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box with search and autonumber

Status
Not open for further replies.

PharmaFun

Programmer
Jul 30, 2003
30
CA
Hi...might be a tricky one to explain.

I have a field box that calculates an autonumber for a form. However, I would like to have it be a combo box, that you can select previous autonumbers from a table, but if you want to add a new autonumber, you just select "Autonumber" from the list and a new number is generated...is that possible?

Thanks,
Dino
 
usually people do this:
have the combo box from which you select a record (in your case you are selecting the autonumber-tho why, i dunno, since it's not very descriptive) anyhow--you leave your combo box as is. then add a BUTTON to the form which (use the wizard) says ADD NEW or something on it. people click that to add a new record.

what i said before about choosing the autonumber from the combo box--usually it would say instead a list of customers, or whatever you have in the table. i can't see my users picking from a list of autonumbers, unless that number prints out on some report or something and people are some how familiar with them.
 
I have a field box that calculates an autonumber for a form. However, I would like to have it be a combo box, that you can select previous autonumbers from a table, but if you want to add a new autonumber, you just select "Autonumber" from the list and a new number is generated...is that possible?

Your are correct, this is tricky to explain. The only way an autonumber is created is when a new record is saved. Not sure why you would want to select a new Autonumber to create.

If you want to create a new number, ie, an invoice number, you will have to do something else; however, you should still have an autonumber. To the best of my knowledge, the only purpose of an autonumber is to assign a unique number to each record. It isn't even necessary for the autonumbers to be in any kind of sequence.

HTH




An investment in knowledge always pays the best dividends.

by Benjamin Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top