queries with combo boxes!!

  • Thread starter Thread starter dara
  • Start date Start date
D

dara

Hi guys,
I was recommended this site as the best place to find solutions for those
problems that take ppl like me days to solve but you guys just seconds!!


I have an input page that contains four combo boxes
one of these looks like: (though the rest do the same thing)
Category A)
Issue 1
Issue 2
Issue 3

I have also set up lots of queries so that i can isloate each of the issues.
So that if i only want issue one then i get all those records.

What i cant seem to figure out is how i can have combo boxes identical to
that on the input page, that look up the queries. so that when i click on an
issue it will only look up the relavent cases.

I have tried the following code in a blank combo box
SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name) Not Like
"~*") And ((MSysObjects.Type)=5));

and then put a button beside it with the code:
Private Sub Command4_Click()
If IsNull(Me.Combo0) Then
MsgBox "Please select a query to view!"
Exit Sub
End If
DoCmd.OpenForm Me.Combo0
End Sub


The problem with this is that it puts all the queries into one combo box, but
i want to be able to separte them out under my categories. I need to be able
to select which queries go into each of my four combo boxes
If there is a way to do this by modifiying the existing code, id love to hear
about it, or if there is a simpler way of doin it id really love to know....
Thanks guys....
 
I'll first admit that I don't understand how you are applying your custom
categories to the data contained within MSysObjects.

To solve the task, I would create my own table that stores query names and
custom categories. From there, the showing of queries based on categories
should be trivial.

"Select * from tblQueries where Category = " & cboCategory
 

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

Back
Top