A
Anders Berlin
I have a form (Machine) that displays records from a table. When clicking a
command button, it opens another form (MachineList), and I want it to use the
same filter as I may have in the first form (Machine).
I have tried the following (in the OnOpen event of the MachineList form):
Me.Filter = Forms("Machine").Filter
If Forms("Machine").FilterOn = True Then Me.FilterOn = True
Problem is that the form Machine includes Combo boxes, and if I use the
filter on those, The MachineList form prompts me for the value of a field
(for instance Lookup_Make.Name).
So what I really would like to do is open the form MachineList based on the
records currently filtered in Machine - only specified by the primary
index-field: "MachineID" - because this field is the same for both forms.
So if I use a filter in the Machine form, which result in three records with
the MachineID values of 1080047, 1080048 and 1080049, I would like the
MachineList form to use the following filter: [MachineID] = 1080047 OR
1080048 or 1080049.
It sounds simple, but how do I do?
command button, it opens another form (MachineList), and I want it to use the
same filter as I may have in the first form (Machine).
I have tried the following (in the OnOpen event of the MachineList form):
Me.Filter = Forms("Machine").Filter
If Forms("Machine").FilterOn = True Then Me.FilterOn = True
Problem is that the form Machine includes Combo boxes, and if I use the
filter on those, The MachineList form prompts me for the value of a field
(for instance Lookup_Make.Name).
So what I really would like to do is open the form MachineList based on the
records currently filtered in Machine - only specified by the primary
index-field: "MachineID" - because this field is the same for both forms.
So if I use a filter in the Machine form, which result in three records with
the MachineID values of 1080047, 1080048 and 1080049, I would like the
MachineList form to use the following filter: [MachineID] = 1080047 OR
1080048 or 1080049.
It sounds simple, but how do I do?