Combobox query

F

fysh1

I am trying to find out how to use A combobox and listbox
on a subform. The way I have it if I select an item from
the combobox it will fill in items on a listbox for me to
choose from. Both have a query. This works if I have it
on a main form, but doesn't on a subform. I keep getting
an error when I try opening the form. It wants me to
specify a value before opening the form. Even if I place
a value or cancel it will open the form, but once again if
I try to select an item from the combobox it asks me to
specify a value before it will show items in the
combobox. All I want to do is pick an item from the
comobox and have it requery the listbox. Like I said it
worked on the main form, but I need it on the subform. I
tried several variations of the criteria, but nothing
seems to work. Does anybody have any ideas on how to
solve this? I need a workable criteria to place in the
query of the actual listbox.
 
D

Duane Hookom

It would help if you copied your list box row source in the posting. I
expect it has a criteria like
Forms!frmB!cboYourCombo
Since frmB is now a subform, your syntax would be something like
Forms!frmMain!frmBName.Form!cboYourCombo
You can use the expression builder to get it right.
 
F

fysh1

Duane thanks for the reply here is what I have for the
Listbox. It is unbound.

SELECT qryClinicTypes.TypeID, qryClinicTypes.Type,
qryClinicTypes.ClinicID
FROM qryClinicTypes
WHERE (((qryClinicTypes.ClinicID)=[forms]![frmSignIn]!
[subSignIn].[form]![ClinicList]))
ORDER BY qryClinicTypes.Type;

Hope you can help in straightening this out.
 

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

Top