I've tried searching for quite a while for an answer but nothing seems to have worked so far.
I have a form with three cascading combo boxes which is used to generate a query. With the code I currently have the query works fine when all three combo boxes have been selected, however on occasion the user may only select an option for combo box 1 and 2 while leaving 3 blank.
Thus, I need my code to pull a report for all entries under the 1st and 2nd subheading, using the 3rd as a wildcard?
This is the code I have:
With the current code, when I complete the form with combo box 1 & 2 selected but 3 blank, it only shows the records where there is an option in the 3rd box. However, I need it show the records where the 3rd box in the record is blank (i.e. A zero-length string I believe).
I hope I gave enough information, please ask if I didn't. Any help would be appreciated
I have a form with three cascading combo boxes which is used to generate a query. With the code I currently have the query works fine when all three combo boxes have been selected, however on occasion the user may only select an option for combo box 1 and 2 while leaving 3 blank.
Thus, I need my code to pull a report for all entries under the 1st and 2nd subheading, using the 3rd as a wildcard?
This is the code I have:
Code:
SELECT tblFeedbackDatabase.ID, tblFeedbackDatabase.DateOfEntry, tblFeedbackDatabase.Flagging, tblFeedbackDatabase.FacultyName, tblFeedbackDatabase.SchoolName, tblFeedbackDatabase.DepartmentName, tblFeedbackDatabase.ModeofStudyType, tblFeedbackDatabase.DataOriginType, tblFeedbackDatabase.Feedback_Classification, tblFeedbackDatabase.FeedbackSubTitle, tblFeedbackDatabase.Feedback_Subheading_2, tblFeedbackDatabase.[Free Text]
FROM tblFeedbackDatabase
WHERE (((tblFeedbackDatabase.Feedback_Classification) Like Nz(Forms![Navigation Form]!NavigationSubform.Form!ClassificationDropdown,"*")) And
((tblFeedbackDatabase.FeedbackSubTitle) Like Nz(Forms![Navigation Form]!NavigationSubform.Form!cbofeedback_subheading_1,"*")) And
((tblFeedbackDatabase.Feedback_Subheading_2) Like Nz(Forms![Navigation Form]!NavigationSubform.Form!cbofeedback_subheading_2,"*")));
With the current code, when I complete the form with combo box 1 & 2 selected but 3 blank, it only shows the records where there is an option in the 3rd box. However, I need it show the records where the 3rd box in the record is blank (i.e. A zero-length string I believe).
I hope I gave enough information, please ask if I didn't. Any help would be appreciated
Last edited: