Auto number in text data type.

  • Thread starter Thread starter KenNiuM
  • Start date Start date
K

KenNiuM

Is it possible to have auto number in text data type?

If it is possible, please assist.
 
No - you can't have an auto"number" as text. But you can convert it in a
query to text.

Is this what you're looking for or something else
eg
1234-ABC
ABC-WXYZ
etc
etc
 
Nope. I was hoping to have a text field that operate the same function as a
auto number just that it is easier to program in visual studio.

Is there no way to this?
 
No, an autonumber is a long integer data type. You can format it to output
as a text value in a query, form or report, however. In a query you'd put
something like:

MyIDFormatted: Format([MyID],"00000")

to return it as a 5 character string with leading zeros. In a form or
report the ControlSource property of a text box would be:

=Format([MyID],"00000")

If you really need the column in the base table to be of text data type
you'd have to write code in a form's module to automatically increment its
value by 1 from the highest value currently in the column.

Ken Sheridan
Stafford, England
 
Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/com...46e-56269e6f6f19&cat=&lang=en&cr=US&sloc=&p=1


Hope you could help.

Ken Sheridan said:
No, an autonumber is a long integer data type. You can format it to output
as a text value in a query, form or report, however. In a query you'd put
something like:

MyIDFormatted: Format([MyID],"00000")

to return it as a 5 character string with leading zeros. In a form or
report the ControlSource property of a text box would be:

=Format([MyID],"00000")

If you really need the column in the base table to be of text data type
you'd have to write code in a form's module to automatically increment its
value by 1 from the highest value currently in the column.

Ken Sheridan
Stafford, England

KenNiuM said:
Is it possible to have auto number in text data type?

If it is possible, please assist.
 
I want to have my query show transactions after the log in time. How do i do
it?

Just set the criteria as something like
[tableName]![LogInTime]
Make sure that the table is shown in the design grid


--
Wayne
Trentino, Italia.



KenNiuM said:
Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/com...46e-56269e6f6f19&cat=&lang=en&cr=US&sloc=&p=1


Hope you could help.

Ken Sheridan said:
No, an autonumber is a long integer data type. You can format it to output
as a text value in a query, form or report, however. In a query you'd put
something like:

MyIDFormatted: Format([MyID],"00000")

to return it as a 5 character string with leading zeros. In a form or
report the ControlSource property of a text box would be:

=Format([MyID],"00000")

If you really need the column in the base table to be of text data type
you'd have to write code in a form's module to automatically increment its
value by 1 from the highest value currently in the column.

Ken Sheridan
Stafford, England

KenNiuM said:
Is it possible to have auto number in text data type?

If it is possible, please assist.
 
The courteous thing to do after people have tried to help, even if you found
the answer elsewhere, is to describe briefly the approach that worked. It
may be of benefit in the future to somebody seaching these postings.


KenNiuM said:
Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/com...46e-56269e6f6f19&cat=&lang=en&cr=US&sloc=&p=1


Hope you could help.

Ken Sheridan said:
No, an autonumber is a long integer data type. You can format it to
output
as a text value in a query, form or report, however. In a query you'd
put
something like:

MyIDFormatted: Format([MyID],"00000")

to return it as a 5 character string with leading zeros. In a form or
report the ControlSource property of a text box would be:

=Format([MyID],"00000")

If you really need the column in the base table to be of text data type
you'd have to write code in a form's module to automatically increment
its
value by 1 from the highest value currently in the column.

Ken Sheridan
Stafford, England

KenNiuM said:
Is it possible to have auto number in text data type?

If it is possible, please assist.
 

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

Back
Top