David44Coder
Member
- Local time
- Tomorrow, 01:49
- Joined
- May 20, 2022
- Messages
- 137
I beg indulgence as I try and ask about something I don’t quite follow.
It concerns the FilterName passed via Docmd.OpenForm
The Filtername here is a just-constructed Query at run time. The forms recordsource is a different (permanent) query.
The Form opens showing all the fields in its record source, NOT all the fields in filtername query.
And only those records that match the Where Clause in the filtername query.
So I changed the filter query to just Select * from Table Where.... x= y and find this works exactly the same as before the change
So the Form uses the field specified in the Where clause Filter ? Is this correct?
I may be confusing Filtername with Record Source. What should Filtername be? A query where only a part of it is used ?
I did try the Where syntax that might be used in e.g. FindFirst or DLookup but that didn't work.
If I open the Form directly it shows a completely different set of data (which matches it Property Sheet)
It concerns the FilterName passed via Docmd.OpenForm
The Filtername here is a just-constructed Query at run time. The forms recordsource is a different (permanent) query.
The Form opens showing all the fields in its record source, NOT all the fields in filtername query.
And only those records that match the Where Clause in the filtername query.
So I changed the filter query to just Select * from Table Where.... x= y and find this works exactly the same as before the change
So the Form uses the field specified in the Where clause Filter ? Is this correct?
I may be confusing Filtername with Record Source. What should Filtername be? A query where only a part of it is used ?
I did try the Where syntax that might be used in e.g. FindFirst or DLookup but that didn't work.
If I open the Form directly it shows a completely different set of data (which matches it Property Sheet)