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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"000" Not working



 
 
Thread Tools Display Modes
  #1  
Old June 10th, 2005, 05:09 PM
Gina Whipp
external usenet poster
 
Posts: n/a
Default "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


Ads
  #2  
Old June 10th, 2005, 05:25 PM
Rick B
external usenet poster
 
Posts: n/a
Default

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  
Old June 10th, 2005, 05:28 PM
Gina Whipp
external usenet poster
 
Posts: n/a
Default

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  
Old June 10th, 2005, 05:33 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

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  
Old June 10th, 2005, 06:33 PM
Gina Whipp
external usenet poster
 
Posts: n/a
Default

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

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

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 02:32 AM


All times are GMT +1. The time now is 03:45 PM.


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