Need something like Macro Substitution

halen99

New member
Local time
Today, 12:03
Joined
Sep 15, 2006
Messages
1
Ok so I know Access doesn't support it but please listen to my prob and hopefully someone has a good solution.

I'm building a rather large INSERT INTO statement. To keep things clean I have FieldName and CorrespondingVar in a table.

I think loop thru the table to create the large SQL insert statement.

My problem is that when I loop thru and say for example.

mString = mString & rs!VarName

The string of course gives me the variable name instead of the value of the var which I declare ahead of time.

see in Foxpro I would say something like

mString = mString + &table.varname

Anyone??
 
Hi halen99,

Fair to say you have these statements somewhere?

Code:
Dim mString As Integer
Dim VarName As Integer

And then try;

Code:
mString = mString + VarName

Does this append correctly?

Look forward to your response

Robert88
 

Users who are viewing this thread

Back
Top Bottom