creating queries

  • Thread starter Thread starter Lucas
  • Start date Start date
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
 
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
 
Back
Top