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
|
|||
|
|||
"000" Not working
Hi Guys,
I am not getting why I can't 3 0's to display. I get an error message "Expecting End of Statement" while to trying to compile this code AND if I leave 000 with nothing I get 1 0 and I need 3 to display in combination with the CustomerID. Cananyone point me in the right direction? DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID )SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & "000" AS ID FROM tblCustomerProfile;" Thanks, Gina |
#2
|
|||
|
|||
Is it a number field? If so, then you will only see one 0. There is no
such NUMBER as 000. 0, 00, and 000 are all just ZERO. When you ask someone for one dollar, you don't ask for "zero zero one dollar". If you need to keep leading zeros you would have to make it a text field. If your field is not a number filed, please ignore my rant :-) -- Rick B "Gina Whipp" wrote in message ... Hi Guys, I am not getting why I can't 3 0's to display. I get an error message "Expecting End of Statement" while to trying to compile this code AND if I leave 000 with nothing I get 1 0 and I need 3 to display in combination with the CustomerID. Cananyone point me in the right direction? DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID )SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & "000" AS ID FROM tblCustomerProfile;" Thanks, Gina |
#3
|
|||
|
|||
Rick,
Yes it is a number field but I am tyring to force the 3 ending 0's because I need it to display 50000. And unfortunately it has to stay a number field. So I am guessing the only way to do this is to use an Append Query (which does work fine)??? Thanks anyway, just trying to cut down on my queries... "Rick B" Anonymous wrote in message ... Is it a number field? If so, then you will only see one 0. There is no such NUMBER as 000. 0, 00, and 000 are all just ZERO. When you ask someone for one dollar, you don't ask for "zero zero one dollar". If you need to keep leading zeros you would have to make it a text field. If your field is not a number filed, please ignore my rant :-) -- Rick B "Gina Whipp" wrote in message ... Hi Guys, I am not getting why I can't 3 0's to display. I get an error message "Expecting End of Statement" while to trying to compile this code AND if I leave 000 with nothing I get 1 0 and I need 3 to display in combination with the CustomerID. Cananyone point me in the right direction? DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID )SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & "000" AS ID FROM tblCustomerProfile;" Thanks, Gina |
#4
|
|||
|
|||
Try:
DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID ) SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & ""000"" AS ID FROM tblCustomerProfile;" -- HTH Van T. Dinh MVP (Access) "Gina Whipp" wrote in message ... Hi Guys, I am not getting why I can't 3 0's to display. I get an error message "Expecting End of Statement" while to trying to compile this code AND if I leave 000 with nothing I get 1 0 and I need 3 to display in combination with the CustomerID. Cananyone point me in the right direction? DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID )SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & "000" AS ID FROM tblCustomerProfile;" Thanks, Gina |
#5
|
|||
|
|||
Van,
Bowing head before the GREAT MASTER a BIG BIG THANKS "Van T. Dinh" wrote in message ... Try: DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID ) SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & ""000"" AS ID FROM tblCustomerProfile;" -- HTH Van T. Dinh MVP (Access) "Gina Whipp" wrote in message ... Hi Guys, I am not getting why I can't 3 0's to display. I get an error message "Expecting End of Statement" while to trying to compile this code AND if I leave 000 with nothing I get 1 0 and I need 3 to display in combination with the CustomerID. Cananyone point me in the right direction? DoCmd.RunSQL "INSERT INTO tblGetAUPReferenceID ( garCustomerID, garAUPReferenceID )SELECT tblCustomerProfile.cpCustomerID, [cpCustomerID] & "000" AS ID FROM tblCustomerProfile;" Thanks, Gina |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook Rules not Working | Marty | General Discussion | 0 | May 6th, 2005 05:58 PM |
Working time and days | Nortos | Worksheet Functions | 5 | May 6th, 2005 04:17 PM |
Working time and days | Nortos | General Discussion | 1 | May 6th, 2005 03:47 PM |
Trace Dependents and Precedents not working | Manish | Worksheet Functions | 0 | April 11th, 2005 09:39 PM |
working offline | Felisa | General Discussion | 2 | March 2nd, 2005 01:32 AM |