By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,485 Members | 1,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,485 IT Pros & Developers. It's quick & easy.

in subform different query

P: n/a
Hello,
my problem is maybe simple but I not see good solution.

I have one form with subform. Form is made from table with one field
and can
not be added new staff.
Subform is continius form made from query.
I try to see if is possible to made some IF THEN or somethng like this
between form and subform.

If in form is define "staff A" I want that in suboform is open query
number
one with staff connected with form.
If in form is define "staff B" I want that in suboform is open query
number
two with staff connected with form.

So different query in subform. Is this possible?

All suggestion is very welcome

Igor Kramarsich, dipl. ing.

Nov 14 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ki***@net.hr wrote:
Hello,
my problem is maybe simple but I not see good solution.

I have one form with subform. Form is made from table with one field
and can
not be added new staff.
Subform is continius form made from query.
I try to see if is possible to made some IF THEN or somethng like this
between form and subform.

If in form is define "staff A" I want that in suboform is open query
number
one with staff connected with form.
If in form is define "staff B" I want that in suboform is open query
number
two with staff connected with form.

So different query in subform. Is this possible?

All suggestion is very welcome

Igor Kramarsich, dipl. ing.

See if something like this works
If Me.StaffType = "A" Then
Forms!YourMainFormName!YourSubFormName.Form.Record source = "QueryStaffA"
Else
Forms!YourMainFormName!YourSubFormName.Form.Record source = "QueryStaffB"
ENdif
Nov 14 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.