A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto number in text data type.



 
 
Thread Tools Display Modes
  #1  
Old January 5th, 2009, 11:43 AM posted to microsoft.public.access
KenNiuM
external usenet poster
 
Posts: 20
Default Auto number in text data type.

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

If it is possible, please assist.
  #2  
Old January 5th, 2009, 11:56 AM posted to microsoft.public.access
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Auto number in text data type.

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

--
Wayne
Trentino, Italia.



"KenNiuM" wrote:

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

If it is possible, please assist.

  #3  
Old January 5th, 2009, 12:01 PM posted to microsoft.public.access
KenNiuM
external usenet poster
 
Posts: 20
Default Auto number in text data type.

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?


"Wayne-I-M" wrote:

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

--
Wayne
Trentino, Italia.



"KenNiuM" wrote:

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

If it is possible, please assist.

  #4  
Old January 5th, 2009, 12:02 PM posted to microsoft.public.access
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default Auto number in text data type.

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" wrote:

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

If it is possible, please assist.


  #5  
Old January 5th, 2009, 12:16 PM posted to microsoft.public.access
KenNiuM
external usenet poster
 
Posts: 20
Default Auto number in text data type.

Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/comm...r=US&sloc=&p=1


Hope you could help.

"Ken Sheridan" wrote:

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" wrote:

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

If it is possible, please assist.


  #6  
Old January 5th, 2009, 01:17 PM posted to microsoft.public.access
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Auto number in text data type.

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" wrote:

Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/comm...r=US&sloc=&p=1


Hope you could help.

"Ken Sheridan" wrote:

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" wrote:

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

If it is possible, please assist.


  #7  
Old January 5th, 2009, 02:07 PM posted to microsoft.public.access
BruceM[_2_]
external usenet poster
 
Posts: 1,763
Default Auto number in text data type.

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" wrote in message
...
Thanks! i got my answers already.

Hope you try to answer one of my other urgent question.
http://www.microsoft.com/office/comm...r=US&sloc=&p=1


Hope you could help.

"Ken Sheridan" wrote:

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" wrote:

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

If it is possible, please assist.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.