[AccessD] SQL statement

John W. Colby jwcolby at colbyconsulting.com
Fri Aug 5 08:21:06 CDT 2005


Kim,

It is considered "bad practice" <ducks and runs from a certain somebody> to
use "special characters" in field names.  Basically only alpha characters
and numbers should be used.  Thus in your case, Quantity1 (or QuantityI)
would be a better name.

Special characters can cause unintended interactions with the VBA compiler
as well as the SQL parsing.  They force the developer to take extra steps to
"wrap" such field names to prevent such interactions.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kim Wiggins
Sent: Friday, August 05, 2005 9:10 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] SQL statement


Well yes, I do have a field called quantity(i) because I have fields that
correspond to parts that are 1-8.  Thanks, I didn't see that space.

Stuart McLachlan <stuart at lexacorp.com.pg> wrote:On 4 Aug 2005 at 19:29, Kim
Wiggins wrote:

> My application is telling me something is wrong with this sql 
> statement for my Access database. Can anyone figure out what's wrong? 
> I don't see anything. strSQL1 = "update tblRepairPartsReplaced set 
> quantity (i) = '" & Val(txtQty(i)) & "' Where part_no = '" & 
> txtPartsRep(i).Text & "'" Thanks Kim
> 


There is a space between quantity and (i). Having said that, do you really 
have a field called "quantity(i)" ?

I'd guess you just want ...quantity = '" & .....




-- 
Stuart


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com






More information about the AccessD mailing list