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!

query problem

Status
Not open for further replies.

vilmarie

Programmer
Feb 10, 2004
41
PR
I have a table with two field: Char and IDNo(example of data in this fields: L, 00001)

If I make a query and I need that both field appear in one column I write:
id: [Char] & " " & [IDNo]
To obtain: L00001,but when I write this expression in my query the zeros don't appear in the result, only appear L1, wHY?

 
Change this...
[Char] & " " & [IDNo]
to this
[Char] & '" & [IDNo] & "'"

The single quotes will tell access to treat the IDNo field as text. Without them, it's being converting to a number.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top