displaying a query result in a form, based on a selection within t

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

Guest

Ive got a text box where the user enters the school of a child. After that
school is selected, I would like the next text box to only list the teachers
with in that school. I have a query that will list the teachers based on the
entry within that form, but I cannot make it appear as a combo box on the
same form. I tried having the school text box run a macro that runs the
query, but it just opens the query and not with in the form. Can you help me
please?
Jason
 
Hi Jason,
Ive got a text box where the user enters the school of a child. After that
school is selected, I would like the next text box to only list the teachers
with in that school.

It sounds like you need the "next text box" to be a combo or list box
instead. Otherwise, you'll need to create a function to concatenate all of
the teacher's names into a string variable, which you can then use to
populate the second text box. I'd suggest that you might even want to replace
the first text box with a combo box, so that spelling challenged users can
select the name of the school without having to spell it correctly. Then
implement the idea of synchronized combo boxes, so that the selection you
make in the first combo box (name of school) limits the values displayed in
the second combo box (names of teachers for the selected school). Check out
the following article:

Limit content of combo/list boxes
http://www.mvps.org/access/forms/frm0028.htm


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Ive got a text box where the user enters the school of a child. After that
school is selected, I would like the next text box to only list the teachers
with in that school. I have a query that will list the teachers based on the
entry within that form, but I cannot make it appear as a combo box on the
same form. I tried having the school text box run a macro that runs the
query, but it just opens the query and not with in the form. Can you help me
please?
Jason
 
Great input. Thanks. I followed the second example on that web page. It
was very easy to do. I had requery working wonderfully. However, I then
used that form for a subform and that messed things up. How do I fix this.
Do I need to redefine the query?
Jason
 
Hi Jason,

I can only make a wag as to what "messed things up" means, since I cannot
see the results you are getting. However, when people start talking
synchronized combo boxes on subforms, my thoughts immediately turn to this
article posted by FMS:

Tip #16: Data in a combo box control on a continuous form/datasheet disappears
http://www.fmsinc.com/free/tips.html#tip16foraccess


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Great input. Thanks. I followed the second example on that web page. It
was very easy to do. I had requery working wonderfully. However, I then
used that form for a subform and that messed things up. How do I fix this.
Do I need to redefine the query?
Jason
__________________________________________

:

Hi Jason,
Ive got a text box where the user enters the school of a child. After that
school is selected, I would like the next text box to only list the teachers
with in that school.

It sounds like you need the "next text box" to be a combo or list box
instead. Otherwise, you'll need to create a function to concatenate all of
the teacher's names into a string variable, which you can then use to
populate the second text box. I'd suggest that you might even want to replace
the first text box with a combo box, so that spelling challenged users can
select the name of the school without having to spell it correctly. Then
implement the idea of synchronized combo boxes, so that the selection you
make in the first combo box (name of school) limits the values displayed in
the second combo box (names of teachers for the selected school). Check out
the following article:

Limit content of combo/list boxes
http://www.mvps.org/access/forms/frm0028.htm


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

Ive got a text box where the user enters the school of a child. After that
school is selected, I would like the next text box to only list the teachers
with in that school. I have a query that will list the teachers based on the
entry within that form, but I cannot make it appear as a combo box on the
same form. I tried having the school text box run a macro that runs the
query, but it just opens the query and not with in the form. Can you help me
please?
Jason
 
Thank you again. I was able to figure this one out. I just needed to point
the control name from the form name to the subform withint the form name. If
that makes sence. Im a little low on the jargon here.

Jason
 
Hi Jason,

Glad to hear that you got it working.


Tom
___________________________________________

:

Thank you again. I was able to figure this one out. I just needed to point
the control name from the form name to the subform withint the form name. If
that makes sence. Im a little low on the jargon here.

Jason
 
Back
Top