[AccessD] SQL statement

Kim Wiggins kimjwiggins at yahoo.com
Fri Aug 5 22:06:05 CDT 2005


Thanks Stuart.  I did figure that out after the fact  You are correct because it can't resolve the field name that way.

Stuart McLachlan <stuart at lexacorp.com.pg> wrote:On 5 Aug 2005 at 8:06, Kim Wiggins wrote:

> I'm sorry John, I didn't explain that well. It is Quantity1, etc.... The (i) is the index in my program for me to loop through the fields.
> 
.....
> > I don't see anything. strSQL1 = "update tblRepairPartsReplaced set 
> > quantity (i) = '" & Val(txtQty(i)) & "' Where part_no = '" & 
> > txtPartsRep(i).Text & "'" Thanks Kim
> > 

If "i" is an index in your code,you can't have it inside strSQL1. When you 
build the string, you have to resolve everything the way you do 
Val(txtQty(i)). IOW you would need to replace "quantity(i) = " with 
something like "Quantity" & i & " = "


-- 
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 


More information about the AccessD mailing list