Thanks Alex, that works. What is the reasoning behind the "&" character,
presumably refering to my VBA variable?
Also, sorry to bug you again, what would the code be if AxaRef was a date
field that I wanted to append?
Hi,
& AxaRef - will add a value of AxaRef, converted into string, to SQL string.
as for dates - you have to put them in #mm/dd/yyyy# format, so your code
will be the following:
DoCmd.RunSQL "INSERT INTO Results ( [AXA Ref] ) Values(#" &
format(AxaRef,"mm\/dd\/yyyy") & "#)"

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
> Thanks Alex, that works. What is the reasoning behind the "&" character,
> presumably refering to my VBA variable?
[quoted text clipped - 33 lines]
>> > to
>> > a Form control before it is useable in an Access Database....is it?!
Agent Dagnamit - 01 Nov 2006 17:25 GMT
Thanks Alex, that's been a great help
Stuart
> Hi,
>
[quoted text clipped - 42 lines]
> >> > to
> >> > a Form control before it is useable in an Access Database....is it?!