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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenated values with Autonumbers

Status
Not open for further replies.

hyperiest

Technical User
Dec 26, 2002
35
US
I am trying to create SKU numbers for my wife's inventory database. The idea is to generate numeric strings based on Autonumbers associated with certain items' product ID (bowls, plates, etc.), the items' pattern ID (121a, 164, etc.) and the product number, each in its own table. I then write a query to concatenate the Autonumber fields from the different tables, but it won't work. I get blanks instead of concatenated strings.

Is there something about Autonumbers that prevents them being used to create a concatenated string? If this is the case, how then does one go about getting around this? Is there a Convert statement one can use to bypass this snag?

Please help. Thanks.
 
Hi,

I use VBA to do this (remember that a autonumber IS a number and needs converting to text).

I use Val to convert the number to text first:

dim MyStr as string

Mystr = Val(AutoNumber) & "a"

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top