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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PARENT CHILD LINK FIELDS

Status
Not open for further replies.

franks

Programmer
Aug 16, 2001
9
ES
Hello
Just a little problem...I hope someone can help.

I have a form and subform.
These are linked via 2 fields, countryfield and country2field, via the parent/child link feature.

Basically I want to show on the subform ONLY records with matching country and country2 fields. So far it works fine.

However, I want to also say "where form.country2=subform.country2 OR subform.country2="ALL"

Some records of the subform sometimes has "ALL" as the value, which means I want it to show it as well.

However on the subform child/parent links property, I don´t know how to add this.
They look like "Country.Codigo;Country2.Codigo".

Any ideas ?
Love you all, this is a great forum and I have learned so much from it (obviously, not enough so far!)

Regards

 
I think the answer to this is you can't do it. The ALL records don't really relate to the main form records. What do I mean by this? I mean if you move one record forward on your main form the ALL records remain exactly the same as before.

If you want them on the same form there's nothing to stop you adding another subform with them in it. You can have several (unrelated) subforms on a mainform. It's quite a handy (if clunky) way of doing lots of updating all on one screen. mike.stephens@bnpparibas.com
 
Thanks for you reply.

I might have confused the question because of the "ALL" value of the field.
The actual field value can be any country (eg, "SWEDEN"), but it can also be "ALL".

This doesn´t mean ALL the records, but all the records with "ALL" value on the 'country' field.

What I am doing is matching countries. For example, the subform will display not only the records with the 'country' field matching that of the mainform record, but it will also display those with the value of 'country' field being "ALL".
I have used "ALL" but it could be "SHOWMEALL" or whatever.
Sorry for the confusion.
regards
 
Yes I understood.

Ask yourself this. You have some record related to Sweden and another related to ALL. Now you move to Norway. There's the same record ALL still there. Right so when do you plan to update it. Do you have a secret rule - only update it when there's an R in the country? If it's nothing to do with Norway or Sweden but rather to do with countries in general then put it in a general context. It means nothing tied to Sweden, Finland etc.

Put it in a separate subform on the same page but not changing when you change countries. mike.stephens@bnpparibas.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top