Unanswered: HELP please with passing filters between forms
I'm reasonably new to ACCESS, but am quite familiar with VB6, Foxpro and a few other languages, however, I am having a serious problem, which is liable to result in the removal of large quantities of hair...
I need to open a form (which has a number of embedded subforms) and filter to a selection made on a previous form.
Unfortunately I have a One to Many relationship between the Main data for the form and one of the Subforms. I need to filter on data that appears in the Many part of the relationship (in one of the subforms). I cannot use the Distinct property of an SQL statement as The recordset it returns is not updateable.
I am sure there is a very easy way around this and I would appreciate any help that can be offered
You will need to have one or more common fields between forms: Ex: ID
Set up a Subform (Child) that does not have any filters, the filter will be set from the Main Form (Master).
On your Master Form place your Subform using the Subform Wizard.
You can select the Common field for both forms. When you open the Master Form, your sub form will be filtered.
If you click on the Subform, and look at the Data Tab, you should see ID as the Link Child Fields & Link Master Fields. If you want multiple fields for your filter, use a Semi Colon between fields.
Ex: Link Child Fields: ID;LastName
Thanks very much for your answers. I don't think i explained myself too well as the answers given do not quite solve my problem. I will try again..
I have two forms "Form A" and "Form B"
I need to open "Form B" from information taken from"Form A". The Master Data on "Form A" does not have the link information, it is in a subform of "Form A" ("Form A" carries four subforms). There are reasons why the link data cannot appear on the master form (It has to do with the updateability of the form and for speed)
Is this possible, could I create a Recordset that will only return the records I require without affecting the uniqueness of the underlying table.