Combo Box Rowsource Values from Database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to query the actual database for the rowsource values in a
combo box?

I have a form that is used to print off reports, and it would be great if I
could just program the combo box to bring up every report in my database that
begins with "order form" rather than having to update a value list every time
a new report is created.

Is such a thing possible?
 
Yes, name all your reports with a prefix e.g.

rptYour_Report_Name

rpt being the prefix

for your combobox

row source type = table/query
and the row source for your combo box should be


SELECT Right(Name,Len(name)-3) AS Report_Name
FROM MSysObjects
WHERE (((MSysObjects.Name) Like "rpt*"))
ORDER BY MSysObjects.Name;
 
Thanks, that's fantastic. If I could take it one step further, I'd also like
to add another column that is the description of the report (the one that is
stored in the database window). I can't find this field in the MSysObjects
table - is there another table I can link?

Thanks again.
 
Back
Top