weeblebiker
Registered User.
- Local time
- Today, 16:08
- Joined
- May 27, 2010
- Messages
- 70
build your query and build the form /report the query info dumps into
add one unbound fields for a single criteria or two unbound field for a range like a date range to the form or report, name the fields (ex: date1 and date2) change the tab order to start with the unbound field,for a range put the beginning field first and the ending field second tab order
go back to your query and in the criteria line for the select field enter
(for specific criteria): [Forms]![form name]![unbound field name]
(for a range): Between ([Forms]![form name]![unbound field name]) And ([Forms]![form name]![unbound field name])
go back to the form
right click the last unbound field, then click "properties" and click on the "event" tab go down to "lost focus" click the little "..." box in the action column click the arrow button and select "requery"
now when you open the form all the fields are blank because the query had no criteria to run.
the first select field will contain the cursor, enter the criteria and when you hit tab (lost focus) the query re runs and populates the form leaving the criteria entered visible because the field is unbound. the requery also puts the cursor back in the first field.
left click on the little circle icon in the top left corner click on the "access options" button and go to "advanced" and select "move after enter"= "next field" and 'Behavior entering field" = "select entire field"
now when you open the form the first criteria field is highlighted, enter the criteria, hit tab or enter and the form populates and the criteria field is highlighted again to enter new criteria.
add one unbound fields for a single criteria or two unbound field for a range like a date range to the form or report, name the fields (ex: date1 and date2) change the tab order to start with the unbound field,for a range put the beginning field first and the ending field second tab order
go back to your query and in the criteria line for the select field enter
(for specific criteria): [Forms]![form name]![unbound field name]
(for a range): Between ([Forms]![form name]![unbound field name]) And ([Forms]![form name]![unbound field name])
go back to the form
right click the last unbound field, then click "properties" and click on the "event" tab go down to "lost focus" click the little "..." box in the action column click the arrow button and select "requery"
now when you open the form all the fields are blank because the query had no criteria to run.
the first select field will contain the cursor, enter the criteria and when you hit tab (lost focus) the query re runs and populates the form leaving the criteria entered visible because the field is unbound. the requery also puts the cursor back in the first field.
left click on the little circle icon in the top left corner click on the "access options" button and go to "advanced" and select "move after enter"= "next field" and 'Behavior entering field" = "select entire field"
now when you open the form the first criteria field is highlighted, enter the criteria, hit tab or enter and the form populates and the criteria field is highlighted again to enter new criteria.