BrotherBook
Registered User.
- Local time
- Today, 11:36
- Joined
- Jan 22, 2013
- Messages
- 43
Hi-
I'm developing a report using a query as it's source data. One of the filters I am trying to apply to it uses data from a textbox on a different form. I have used this method before without issue, but it seems to be causing a problem here.
In my form I have a listbox called StageSelections. The user can make multiple selections in the listbox. I then have code that compiles the data into a text string and writes this value to a hidden text box (StageFilter). I then use StageFilter as a criteria for the Stage field in my query.
When i set the criteria to be [Forms]![Launch Reports]![StageFilter] my report always shows up with no records. When i change the criteria to be the text string in StageFilter it works fine. So it seems like it is not an issue with how I have constructed my text string, but how I am setting the query criteria.
Example 1:
[Forms]![Launch Reports]![StageFilter] = Like '*'
-generates no records, but if i just set the criteria to be Like '*' myself it works fine.
Example 2:
[Forms]![Launch Reports]![StageFilter] = In ('1 - Introductory','4 - Term Sheet Accepted & In U/W')
-generates no records, but if i just set the criteria to be In ('1 - Introductory','4 - Term Sheet Accepted & In U/W') myself it works fine.
Any idea what may be causing this? I can provide any other information you might need.
Thanks,
Mike
I'm developing a report using a query as it's source data. One of the filters I am trying to apply to it uses data from a textbox on a different form. I have used this method before without issue, but it seems to be causing a problem here.
In my form I have a listbox called StageSelections. The user can make multiple selections in the listbox. I then have code that compiles the data into a text string and writes this value to a hidden text box (StageFilter). I then use StageFilter as a criteria for the Stage field in my query.
When i set the criteria to be [Forms]![Launch Reports]![StageFilter] my report always shows up with no records. When i change the criteria to be the text string in StageFilter it works fine. So it seems like it is not an issue with how I have constructed my text string, but how I am setting the query criteria.
Example 1:
[Forms]![Launch Reports]![StageFilter] = Like '*'
-generates no records, but if i just set the criteria to be Like '*' myself it works fine.
Example 2:
[Forms]![Launch Reports]![StageFilter] = In ('1 - Introductory','4 - Term Sheet Accepted & In U/W')
-generates no records, but if i just set the criteria to be In ('1 - Introductory','4 - Term Sheet Accepted & In U/W') myself it works fine.
Any idea what may be causing this? I can provide any other information you might need.
Thanks,
Mike