cornishteeth
Board Regular
- Joined
- Dec 6, 2002
- Messages
- 117
Newbie question. I have a query that contains 3 fields from a table. I want to have criteria for each of my fields, but I would like to skip a field criteria if I desire not to have that info injected into the query. For example, I have ShipName, ShipNumber, and Date. Under ShipName my criteria is
Like "*"+[Enter Ship Name]+"*".
Under ShipNumber I have [Enter Ship Number]
The query works if all criteria are met. If I do not want to enter one of the fields, how do I skip it without it affecting the output. If I just hit enter when the Input Box appears, the query does not work.
Examples: I enter ALEXANDRIA when Enter Ship Name appears and hit the enter key when Enter Ship Number appears. Query does not work. I enter ALEXANDRIA when Enter Ship Name appears and enter M4567 when Enter Ship Number appears. Query works. I hit enter when Ship Name appears and enter a Ship Number. Query does not work.
Another thing, I want to put in the Date field Between [start]and [stop]. Query does not work.
Any help would be great.
Cheers,
Cornish Teeth[/img]
Like "*"+[Enter Ship Name]+"*".
Under ShipNumber I have [Enter Ship Number]
The query works if all criteria are met. If I do not want to enter one of the fields, how do I skip it without it affecting the output. If I just hit enter when the Input Box appears, the query does not work.
Examples: I enter ALEXANDRIA when Enter Ship Name appears and hit the enter key when Enter Ship Number appears. Query does not work. I enter ALEXANDRIA when Enter Ship Name appears and enter M4567 when Enter Ship Number appears. Query works. I hit enter when Ship Name appears and enter a Ship Number. Query does not work.
Another thing, I want to put in the Date field Between [start]and [stop]. Query does not work.
Any help would be great.
Cheers,
Cornish Teeth[/img]