Forms and Querys

pdbaker

Registered User.
Local time
Today, 11:16
Joined
Jul 19, 2006
Messages
19
I have a form which has a subform on it and this performs a query and displays a list of courses only done by a particualr provider which changes when you change the record i now have buttons beside each course and want to be able to get it to open up another form and then display dates for that particualr course and whos attending whats the easiest and best way to do this as im really stuck and need to get this finished.
 
You could create a new form that would display all people attending all courses, then open it with a filter to just show those people/courses relevant to whatever the user selected on the first form.
 
hi

could you explain in more detail how to do this sorry im being thick but didnt relise you could filter on a form?. they now what the database done by tuesday so i need 2 get a move on
 
Should have explained better last time. Sorry about the confusing (and probably incorrect) phrasing, but I'm a bit rushed today.

You can have a datasource for the second form, say

"select * from table1;".

When the user picks some criteria from a field, you open the second form and you reset the data source to be

"select * from table1 where lastname = 'Jones';".

Instead of specifically saying 'Jones' you use

"select * from table1 where lastname = '" & [Forms]![form name]![field name] & "';"

This allows you to control the data behind the form via whatever the user selects.

Hope that's more helpful. :)
 
hi

i had a go with ur example but still couldnt really get it 2 work someone has suggested i could create 3 querys each one filters out the e.g the course duration for that particualr company and then create 3 forms and then use a button to load each one but i have created the 3 querys and forms not sure about how i can get one button to switch between the 3 dependong on what course i click on.
 

Users who are viewing this thread

Back
Top Bottom