I have searched for an answer but it seems that people are having my problem the other way round.
I have created a simple 2 criteria search form that runs a query. It works perfectly if both fields are filled in and pulls the expected results. My problem is if 1 field is filled and the other is blank it returns no results. There are no records that will have either criteria blank but the person searching may not know both criteria or may be looking to pull a report based on a single criteria.
I want the blank field to be a wildcard, so it pulls up everything associated with the filled criteria rather than the blank representing nothing.
Will I have to create separate queries for each possible search scenario? Or is there a simple way to specify that each field is a wildcard? The number of search criteria will increase soon as the plans for this db have been scaled up. Whichever way I solve this problem will need to be scalable to say 5 or 6 search criteria.
Hope you guys can help me and a solution isn't too complicated. Ive built most of it through wizards and design rather than code as I am very unfamiliar with VB code.
I have created a simple 2 criteria search form that runs a query. It works perfectly if both fields are filled in and pulls the expected results. My problem is if 1 field is filled and the other is blank it returns no results. There are no records that will have either criteria blank but the person searching may not know both criteria or may be looking to pull a report based on a single criteria.
I want the blank field to be a wildcard, so it pulls up everything associated with the filled criteria rather than the blank representing nothing.
Will I have to create separate queries for each possible search scenario? Or is there a simple way to specify that each field is a wildcard? The number of search criteria will increase soon as the plans for this db have been scaled up. Whichever way I solve this problem will need to be scalable to say 5 or 6 search criteria.
Hope you guys can help me and a solution isn't too complicated. Ive built most of it through wizards and design rather than code as I am very unfamiliar with VB code.