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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Generate Account Numbers with Text
How can I generate account numbers with the first 3 charters "ALS" then
numbers after? Example: ALS3000 ALS3001 ALS3002 can this be done in the table or must it be done on the form before update? Thanks, Arlend |
#2
|
|||
|
|||
Generate Account Numbers with Text
Store only the account numbers as strings in your table. Base your form on a
query based on the table and add "ALS" to the accountnumber in a calculated field in your query: MyAccountNumber = "ALS" & AccountNumber Steve "Arlend Floyd" wrote in message ... How can I generate account numbers with the first 3 charters "ALS" then numbers after? Example: ALS3000 ALS3001 ALS3002 can this be done in the table or must it be done on the form before update? Thanks, Arlend |
#3
|
|||
|
|||
Generate Account Numbers with Text
On Fri, 12 Dec 2008 12:24:10 -0800, Arlend Floyd wrote:
How can I generate account numbers with the first 3 charters "ALS" then numbers after? Example: ALS3000 ALS3001 ALS3002 can this be done in the table or must it be done on the form before update? Thanks, Arlend You cannot combine text with a number in a Number datatype field in a table (nor is there any reason to save the "ALS" if it is always the same text), but you can combine a number with the text in an Unbound control, on your form in Report. Add a field to your table. Field name [TheNumber] Number datatype, Field Size Long Integer In the form that you use for data entry, as the default value for this [TheNumber] control, write =Nz(DMax("[TheNumber]","TableName"),2999)+1 Each new record will increment from 3000, by 1, and the number will be stored with that record in the table. Then wherever you need to show the value with the text, on your form or report, use an unbound control: ="ALS" & [TheNumber] -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
Generate Account Numbers with Text
Thanks it works
"Steve" wrote: Store only the account numbers as strings in your table. Base your form on a query based on the table and add "ALS" to the accountnumber in a calculated field in your query: MyAccountNumber = "ALS" & AccountNumber Steve "Arlend Floyd" wrote in message ... How can I generate account numbers with the first 3 charters "ALS" then numbers after? Example: ALS3000 ALS3001 ALS3002 can this be done in the table or must it be done on the form before update? Thanks, Arlend |
Thread Tools | |
Display Modes | |
|
|