Using a textbox for a column name

Myriad_Rocker

Questioning Reality
Local time
Today, 06:26
Joined
Mar 26, 2004
Messages
166
How in the world can I accomplish this? I have a set of dates on a form that change from week to week. I'd like to reference these text boxes in a query as column names. How can I do this?
 
I got to thinking about it a bit and couldn't I actually do something like this?

First, define my column variables as text and then store the text fields into those variables. Then...

Code:
SQL = "SELECT ColName1 As " & ColVar1 & ", ColName2 As " & ColVar2 & " etc...
 

Users who are viewing this thread

Back
Top Bottom