link to another table with intent

Z

Z

Im trying to create either a button, or just a text link to open
another form -- but I would like to form to open with the same
'location' as the form that its coming from.

so i have this form 1
it says:
Location: School
Grades: 1-8
Students: 1000

i want to put a link or button at the bottom maybe "bus"

so then bus would open up a new form (form 2)
Location: School
Bus: 10
Routes: Standard

so the "location" on the two forms would match, however, they are both
using different tables and are on different forms. Would i need to put
relationship between the two tables? But im sure theres code that im
gonna need to put on the link/button to open it correctly.

Z
 
G

Guest

Yes, set up a one-to-many relation from table1 to table2.

You can do it with macro instead of code. Use a command button to call a
macro named Buses.
In the macro --
Open - form - Form2

Build a query with criteria for location --
[Forms]![YourForm1]![YourLocationTextBox]

Have closure of form1 to close form2.
 
Z

Z

thanks for the quick reponse --

Im not totally clear on one-to-many relation, however, i did create a
relationship between
table1 table2
location ---> location

go to relationship
right click
show table
then i clicked on location from table 1
then draged it over to the location in table 2

I built a macro
used OpenForm
form name: Macro1
view: form
filter name: [Forms]![SCHOOLDISTRICTfrm]![LOCATION]
where condition:
data mode:
window mode: Normal

i pressed the button and it opens the form, but it doesnt match the
location given in form 1 with the location in form 2
any ideas why? or something i missed perhaps?

Z
 
G

Guest

You did not follow what I said. You used the wizards which do not give you
all the options available in design view.

See my post 8/10/2005 Finding a record in a main form
 

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