link subforms with a condition?

hansnyc

Registered User.
Local time
Yesterday, 16:31
Joined
Apr 12, 2007
Messages
50
Hello

I have a basic customer form
listing data from tblcustomers with customerID, Customername adresss etc...

then I have a subform showing deliveries made for or to that customers

My issue is a customer can be a shipper or a consignee (receiver)
tbldeliveries has a refshipper linked to tblcustomers and a refconsignee also linked to tblcustomers

I'd like to display all deliveries where the customer was involved

right now I can only display either/or
If i do master and child and put both customer ID <-> refshipper and customer ID <-> refconsignee

i get a blank subform

I need to put a condition somehow saying If CustomerID = refcustomer (shipper) then display data else customerid= refconsignee (receiver) then also display data

I am at a lost, can someone help?

thanks

I have attached a shirt simplified copy of my dba with just the forms and tables I am talking about

you will see that my customer form is has a subform linked customerID <-> RefCustomer
RefCustomer is a small txtbox which you can't see placed right before Order ID

I could link companyname <-> companyname but I have 2 of them on the subform

can someone help
 

Attachments

Users who are viewing this thread

Back
Top Bottom