Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking subform/form with "OR" relationship

Status
Not open for further replies.

LeonePak

Technical User
Jan 18, 2003
4
US
I have a subform, which is linked to a form using Date1 and Date2.

Under the properties of subform, I have these relationships, which works fine.

Link Child Fields: ApptDate; ApptDate
Link Master Fields: Date1; Date2

This opens all records that has ApptDate = Date1 AND Date 2 in the subform in a continuous view.

Can I create a relationship that opens all records that have ApptDate = Date1 OR Date2?
LeonePak
 
I don't think you can create an OR relationship using the LinkChildFields property of a subform control. But, you can attack this in a different manner.

I am not sure if you are only looking for the OR relationship or if you want to bounce back and forth between the OR and the AND relationship. But, you can create a query for the subform that will create your OR relationship and use that query instead of the LinkChildFields property process. This can be done dynamically through code if this sounds like what you want to do. I have had multiple relationships from the Main form to the SubForm records and have used multiple subforms each with a unique query to pickup the correct records. This is done with references back to the main menu controls or to Functions that pickup Global variable values set in the main menu.

Let me know if I can help you set this up. I just need to know a little more details. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top