creating queries

L

Lucas

I was wondering if I could create a query, for instance,
where I can select the columns being displayed by
selecting column name from a drop down menu from a form.

Best regards,

Lucas
 
A

Arvin Meyer

Lucas said:
I was wondering if I could create a query, for instance,
where I can select the columns being displayed by
selecting column name from a drop down menu from a form.

You can in code, but not in the query grid. Something like this ought to
work:

Create a combo box with a rowsource type of field list and a command button.

Sub cmdTest_Click()
Dim strSQL As String
strSQL = "Select " & Me.cboFieldList & " From Table1"
Debug.Print strSQL
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top