Hi Graham
Excellent - thank you. I'll experiment with doing it that way to achieve the same thing.
cheers
Phil
________________________________
From: Graham Mandeno graham@mandeno.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Wednesday, 20 February 2013, 22:24
Subject: RE: [MS_AccessPros] multiple use of Forms!
Hi Phil
In most cases, the best practice is to leave the WHERE clause out of the
query and use the LinkMasterFields and LinkChildFields properties of the
subform control. This will cause the subform to be automatically filtered
on the LinkChildFields field according to the current value of the
LinkMasterFields control on the main form. In addition, it dynamically sets
the default value for the LinkChildFields field to the current value of the
LinkMasterFields control, so that any new records added to the subform are
automatically linked.
Cheers,
Graham
From: mailto:MS_Access_Professionals%40yahoogroups.com
[mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of pdk444444
Sent: Thursday, 21 February 2013 11:14
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: [MS_AccessPros] multiple use of Forms!
Hi
I have 2 forms that are very similar but provide slightly different
functionality to different users - say formA and formB
I have added a subform to formA which is based on a query that uses
forms!FormA!id in the criteria field
If I add the subform to formB it doesn't work and I have to duplicate the
query for forms!FormB!id and change the subform to use the 2nd query.
This wasn't so bad to start with but now I have multiple versions of the
form and with multiple subforms and it could become a nightmare.
SO .......
instead of using the specific form name (ie formN) in forms!formN!id in the
query, is there a construct that tells the query to use the current form
regardless of its name? - does Me! have any part to play in this?
As usual, any help would be very much appreciated
cheers
Phil
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar