G
Guest
I want to run an append query to append data to an existing Access table
calculated from procedures run against a recordset. This doesnt work:
DoCmd.RunSQL "INSERT INTO Results ( [AXA Ref] ) SELECT [Axaref] AS [AXA Ref]"
...even though "AXA Ref" is definately a valid field in table "Results", and
"Axaref" is an existing VBA variable (with value 1). When I run this,, the
Access "Enter Parameter Value" dialogue box appears.
However, I can assign the value "Axaref" to a field on a form, and then use
that form control's value in an append query, like this:
Forms![AdvertForm].[axa] = AxaRef
DoCmd.RunSQL "INSERT INTO Results ( [AXA Ref] ) SELECT
Forms![AdvertForm].[axa] AS [AXA Ref]
I'm sure it isnt really necessary to transfer the value of a VBA variable to
a Form control before it is useable in an Access Database....is it?!
calculated from procedures run against a recordset. This doesnt work:
DoCmd.RunSQL "INSERT INTO Results ( [AXA Ref] ) SELECT [Axaref] AS [AXA Ref]"
...even though "AXA Ref" is definately a valid field in table "Results", and
"Axaref" is an existing VBA variable (with value 1). When I run this,, the
Access "Enter Parameter Value" dialogue box appears.
However, I can assign the value "Axaref" to a field on a form, and then use
that form control's value in an append query, like this:
Forms![AdvertForm].[axa] = AxaRef
DoCmd.RunSQL "INSERT INTO Results ( [AXA Ref] ) SELECT
Forms![AdvertForm].[axa] AS [AXA Ref]
I'm sure it isnt really necessary to transfer the value of a VBA variable to
a Form control before it is useable in an Access Database....is it?!