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!

Setting Auto Number

Status
Not open for further replies.

JRA

Programmer
Apr 19, 2001
106
CA
How and where do I set an auto number property or method for a text box?
 
Not too clear on what you want but in your table's design view there is an autonumber data type under the data type column.
 
I'm trying to set an auto number for a text box on a form. I want it be something like A1, A2 etc., but I understand that I cannot set an auto number with a letter unless I type the following code ...

[ID Number] = "ID" & [autonumberText]

I don't know where to type this code in though.

Thanks,
James.
 
I still need help with this. If anyone can give me any suggestions i would really appreciate it.
 
Hi!

You can try it if [ID Number] is field of table:
[ID Number] = "ID" & val(mid(dmax("ID Number","YourTable"),3))+1

Aivars
 
JRA. I'm not a programmer so I'm not sure I understand your question. But I get the impression what you want to see on your form is the automatic id number preceded by the letter "A". To do this, base your form on a query instead of your table. Your query will be based on your table. Open the query in design mode and enter the following line for the ID field: "id: "A" & ([ID Number])".

Hope you see what I mean.

This will work. The form will show you the following records: A1; A2; A3; ETC. It worked for me when I tried it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top