Stop a Subquery Prompt in a Form?

Littlemalky

Board Regular
Joined
Jan 14, 2011
Messages
223
I'm using Access 2007 and have a default form that launches immediately when the database is opened. On one of the tabs, in the form, exists a subquery that shows a list of employees. There are text boxes used to filter the subquery to refine a search, but if nothing is selected I want it to return ALL results, naturally.

In my query I have this statement in the criteria:

Like Nz([Forms]![frmIncident_Recording]![frmXXX_Subform].[Form]![fltIncident_Number],"*")

This is used so the user can search for a particular incident.

My issue is that when the form initially launches, it prompts for each one of these fields that I have this kind of statement in. How do I get rid of this prompt so the form can just launch clean and they can set their filters after the fact?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Make sure the field exists in the query. If it doesnt, then the sql will think its a parameter and keep asking.
or
Build the form using a base startup query that includes everything. qsAll
Then after user selects something , you can reassign the query to one that is filtered. qsFilter
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top