Filter to select from various fields on opening a form

O

Owl

I have a form called TDC and want to filter data in the following fields on
opening the form: DiaryAction (text field); DiaryCategory (text field);
DiarySubCategory (text field); Company (text field); ContactType (text
field); DiaryItemClosed (a Yes/No field). At the same time, I want the
option not to select anything in each of these fields.

Please could somebody give me the steps to do this.

I am doing this in Access 2007, but am creating it as an Access 2003 database.

Thank you for any help.
 
O

Owl

I meant to say that I want this from dropdown boxes, but forgot to say
because I have to type quickly as I keep losing my Internet connections.
 
J

John Spencer

I should have included a reference to another article on doing this. It is
actually a more comprehensive example.

http://allenbrowne.com/ser-62.html

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
O

Owl

Thank you for your trouble. However, neither of these are what I am looking
for. Perhaps I didn’t explain clearly enough in my rush to finish typing
before I lose my connection ( I am not getting as much as 2 minutes together
online before I get cut off – and have typed this reply in Word and copied it
in afterwards).

Normally I have in “Criteria†of a field e.g. Like "*â€&[Enter Company or
leave blank for all companies]&â€*†and the user has to type in the name of
the company BEFORE the form (or report) opens. I want to be able, instead,
to have the user select the company name from a drop down box BEFORE the form
(or report) opens – and the same with all the other fields I specified.

Thanks for any help.
 
J

John Spencer

I know of no way to do so. Unless you open a form with just the controls on
it and then open a report or another form after selecting or inputting values.

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm

Or check out this from MS
http://office.microsoft.com/en-us/access/HA011730581033.aspx

Or for another example
http://allenbrowne.com/ser-62.html


A brief quote from a John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with a
Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be sure that the bound field of the combo is the
value you want to use as a criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form or
report, the user can enter the criterion and view the results in one simple
operation!

End quote

Keywords: Parameter Queries, comboboxes

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
Thank you for your trouble. However, neither of these are what I am looking
for. Perhaps I didn’t explain clearly enough in my rush to finish typing
before I lose my connection ( I am not getting as much as 2 minutes together
online before I get cut off – and have typed this reply in Word and copied it
in afterwards).

Normally I have in “Criteria†of a field e.g. Like "*â€&[Enter Company or
leave blank for all companies]&â€*†and the user has to type in the name of
the company BEFORE the form (or report) opens. I want to be able, instead,
to have the user select the company name from a drop down box BEFORE the form
(or report) opens – and the same with all the other fields I specified.

Thanks for any help.

John Spencer said:
I should have included a reference to another article on doing this. It is
actually a more comprehensive example.

http://allenbrowne.com/ser-62.html

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top