Query from a Form

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

Guest

Is it possible to get a query to show combo boxes as they are in a form? Would the form have to be populated with information for the query to work? I'd like the query to gather information out of my tables, but by using combo boxes. I have a form with combo boxes that update as information is entered in the previous combo box. I would like that same process to occur, but in a query. Any suggestions

Thanks
Meghan
 
Meghan,

As far as I know, this is not possible. The form is the correct
location to do this type of functionality... Is there a problem with
doing it on the form. Generally speaking, a query datasheet is seen
during development and testing, but not for human consumption in normal
database usage.
 
Thanks for responding Steve

Well, I'm not sure if I can get what I need out of the form. There are multiple tasks that have various pieces that are not directly related. I want to create something that will enable anyone in the office to search a task, then by the phase of the task, then by the deliverable of the phase, and produce all known information about that specific combination. Could this be done on a form? It's not for them to directly input information, but more of a search and status tool, although I'd like to make a button that they can click on to direct them to the form that allows them to enter more information if they need to. Do you have any suggestions? Or know if this is even possible? Thanks again for any assistance. I'm new to Access, so please bear with me in my inexperience

Meghan
 
Meghan,

Yes. There are several apporaches you could take to this. Without
going into too much detail, here is the general concept of one way to do
it...

On the form header put 3 unbound comboboxes. Set them up so the first
one shows all Tasks, the second one shows all Phases related to the Task
selected in the first one, and the third one shows all Deliverables
related to the Phase selected in the second one.
Make a query to return the information you want, and in the criteria of
the relevant field in the query, refer to the selection(s) in the
combobox(es) on the form, using syntax such as...
[Forms]![NameOfYourForm]![NameOfCombobox]
Make this query the Record Source of the form, which presumably will be
a continuous view form.
On the After Update event of Combo1, put code like this...
Me.Combo2.Requery
and on the After Update event of Combo2, put code like this...
Me.Combo3.Requery
and on the After Update event of Combo3, put code like this...
Me.Requery

This should pretty much do the kind of thing you are asking. You can
put little command buttons on the form so that the user can link to
other forms related to the current record of your result set, if they
need to access or edit any of the component data.
 
Back
Top