G
Guest
I was wondering if there is a way to be able to choose which queries I want in the drop down box instead of all of them. The code is below that I have to receive all queries in the drop down box.
Thanks,
-Mat
----- Graham R Seach wrote: ----
Matt
There's no way the query you used can return every report, query and table
Specifying Type=5 filters it to return only query names. Check again
SELECT [Name] FROM MSysObject
WHERE [Type] =
ORDER BY [Name
As for running the selected query, this code will do it
Private Sub cboMyCombo_AfterUpdate(
If Not IsNull(Me!cboMyCombo) The
CurrentDb.Execute Me!cboMyCombo.Value, dbFailOnErro
End I
End Su
Regards
Graham R Seac
Microsoft Access MV
Sydney, Australi
Microsoft Access 2003 VBA Programmer's Referenc
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.htm
the selection of the query. I tried the following code but it gives m
every report, query, table, etc etc in my dropdown box. Is there a way t
pick which queries I want in my dropdown? Thank you very much
Thanks,
-Mat
----- Graham R Seach wrote: ----
Matt
There's no way the query you used can return every report, query and table
Specifying Type=5 filters it to return only query names. Check again
SELECT [Name] FROM MSysObject
WHERE [Type] =
ORDER BY [Name
As for running the selected query, this code will do it
Private Sub cboMyCombo_AfterUpdate(
If Not IsNull(Me!cboMyCombo) The
CurrentDb.Execute Me!cboMyCombo.Value, dbFailOnErro
End I
End Su
Regards
Graham R Seac
Microsoft Access MV
Sydney, Australi
Microsoft Access 2003 VBA Programmer's Referenc
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.htm
queries appear in a dropdown box, and then run a command button/report froMatt said:
the selection of the query. I tried the following code but it gives m
every report, query, table, etc etc in my dropdown box. Is there a way t
pick which queries I want in my dropdown? Thank you very much
Set the combo box Row Source Type property to Table/Query Set the Rowsource to
SELECT MSysObjects.Name FROM MSysObjects WHERSet the ColumnWidths property to 1(((Left([Name] said:Set the bound column to 1
Set the LimitTo List to Yes
Set the AutoExpand to Yesbeing selected in this combo box, code the AfteUpdate eventThen, if you wanted to run any one particular query, based upon i
DoCmd.OpenQuery Me!ComboNam