Linking Row Source in a subform

B

BUGSWorker

I have a subform that has School, City, State, and some other fields.
Currently, School, City, and State each pull from a different query which
pull from a table titled Grad Schools. I am trying to have it so that when I
choose a School name, the City and State fill in automatically. I've tried
having each of the 3 fields get their information from the table, but could
not get that to work. Do they need to get information from the table or will
the queries work? I've tried this before and remember I had to mess with the
column width and Bound Column in the properties. It is fine if the these 3
fields are not editable, as additions to the table can be done quickly and
easily. Thanks in advance!
 
K

karl dewey

Currently, School, City, and State each pull from a different query which
pull from a table titled Grad Schools.
Why are you usin three queries when all the data is in the same table?
In what fashion did it not work? No data, wrong data, etc? Post the SQL of
the query.
 
B

BUGSWorker

I'll answer your first question by starting with the second. When I had them
each pulling from the same table, I would have trouble making it so that the
City field showed the City options and the State showed the States. I messed
with the bound column to get those to take from the columns in the table. I
thought making them in different queries would be a way around my problems
with having the city and state not show up. I tried having the school name
pull from the table, and the other two take from their respective queries,
but it still will not force city and state once the School has been selected.
I feel like this should easily be done with the table, but moved to queries
as an alternative. If it can still be done via the table, that'd be best.
Again, I'm looking to have a subform with combo boxes pull from a table, and
if a school name is in the table, and it is selected, the city and state will
automatically fill in. Thanks in advance.


Steve
 
K

KARL DEWEY

Use this for the combo but your table and field names --

SELECT [ID], [School] & " - " & [City] & ", " & [State] FROM YourTable
ORDER BY [School];
 

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