|
Post by mackrackit on May 26, 2008 10:12:32 GMT -5
I have been googling this and can not figure it out. I want to display two columns. One column is always the same while the second column is user selected. The query with out variables looks like this. query$ = "select [Pottery Name], [Age] from Table1"
The variable comes from a list box. listbox #CAV,arrayC$(),1 VFR$=#CAV selection$() R$ = trim$(#CAV selection$())
I have tried several things and all I get is something like 'R' or 'Age' in all of the display columns. This is some of what I have tried query$ = "select [Pottery Name], '";VFR$;"' from Table1" query$ = "select [Pottery Name], '"+dblQuote$(VFR$)+"'"fromTable1" query$ = "select [Pottery Name], '";+VFR$+;"' from Table1"
Also tried using R$ in place of VFR$ thinking it needed trimed.
|
|
|
Post by mackrackit on May 26, 2008 13:14:08 GMT -5
WhooHoo! I figured it out! Build the query as a string. gnq$="select [Pottery Name], [";R$;"] from Table1"
Then query$ = gnq$
Now it is time for a nap!
|
|