Newbie needs help on Controls

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I am very new with Access 2003 but I think it should be possible to have
either a form or report that has either a combo box or text box on it that I
can enter a search criteria item into and Access will return all of the
records this criteria relates to. I am hoping that this can be done on a
form so that I can step through the retrieved records using the arrows at
the bottom. Is it possible? How? A friend said this is only possible in an
application but I don't have a clue what that means

Thanks so much for your help...
 
Consider taking a look at Access HELP concerning the use of "filters". You
might be able to do what you want with that.

Is there a chance your friend writes applications?<g>

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Sorry it took so long to get back. Never used NG's before.

Are you saying that it is possible to put a control like the combo box on a
form and have it act as the filter for getting just the data I want? I will
try it for sure if that is the case. And thanks for the quick response.
Much apprecaited...
 
Evi,
No, but if that is the right way to do this I can do it. What I am
trying to do is pretty simple. I have a form that shows my music collection
with four fields for data. I put a combo on the form tied to a table/field
that is unique to each piece of music. I wanted to have that combo act as
the selector for the rest of the data displayed. Seems like it should be
fairly easy but I can't seem to make it work. I didn't try Mikal's
suggestion yet-tomorrow - but that is my story as of now.
 
Hi Paul, it will help you next time you write to give your field names
because it makes instructions easier to follow. It may also help to tell us
if you are using Wierdo erhem Access 2007 because so many of the buttons and
things are in different places.

You can certainly do what you want to do, using a form. (combo boxes don't
do anything in reports, although you can filter reports using a combo box in
a form).

Filtering a subform is just one way of achieving what you want. I'm just
trying to see what you have got in front of you so I can give you the
appropriate help.

I'm still not getting your description.
Is the form bound to a table or query (ie in the form's design view, when
you click on Properties and click on the Data tab, is there anything written
next to Record Source?
If it is an unbound form and it doesn't have a subform, do you want the
choices you make with your combo, to open up another form, filtered to show
only certain records.

If it is a Single or Form (look next to Default View in the Format tab of
Properties) do you want to turn to a specific 'page' or go to a single
record on the form according to what you select with the combo?

Do you have eg a field which gives you the different singers and you want to
use your combo to filter your form so that all the recordings for that
singer alone are shown?

Is the field which you want to filter a date, a number or text?

I think that your friend was trying to fog you. Access databases are often
called Applications just because either you or one of the many Wizards can
put code into your forms and reports to make things happen automatically. As
soon as you or the Wizard puts in your first bit of code you can start
calling your database an 'Application' (if you want to impress). Coding is
nowhere near as difficult as it sounds so don't let your friend put you off.
If you can help us to 'see' what you can see, we can help you to achieve
your goal.

Evi
 
Hello Evi,



Your help is most gracious. I will try to explain by answering your
questions.



I am using a single table named MusicTable with these fields: SlotNum,
Title, Artist, MusicType, Label, FeeStat, and Duration. Slotnum is unique
and the primary key. I may split this table later but for now this is what I
have.



The form I am using is named "LookupForm" and is currently bound to a query
named simply enough "DataQuery". I put this into the Record Source in the
property sheet for the form.



The query retrieves all of the table fields. I thought I could filter based
on the combo box so I put [Forms]![LookupForm]![SlotNumBox] into the
criteria field of the query because I thought that might get what I wanted.
"SlotNumBox" is the name of the combo box on the form "LookupForm".



My thought was that by doing these things the query would use whatever value
I selected in the combo box. Apparently the query doesn't update the
recordset until it is executed so I now get nothing by selecting a SlotNum.



All I want to do is be able to select the SlotNum value in the combo box
"SlotNumBox" on the form and have the form populate a group of text boxes
with the associated data. The text boxes could be on a sub form, I suppose.
Currently they are just on the form itself.



Hope this helps. What do you think? I look forward to hearing from you.



Paul
 
Hi Paul
Firstly, Take the parameter ([Forms]![LookupForm]![SlotNumBox] ) out of your
query's criteria line.

I've got a bit confused by your use of phrases like You want the combo to
'populate some text fields'. You would do this if you had an unbound form
with empty text boxes.

But if your form is based on a query then the text fields will have already
have data in them - the data in the query.

You didn't say if LookupForm is a single form or a Datasheet form (see
below). If you add a combo box to a single or continuous form the wizard
will usually ask if you want to look up a value based on the selection in
your combo box.
Since SlotNum is a Primary key field and there is only one record for each
slotnum then this is the option you need. It is not really filtering the
form, it is just finding the record that matches that SlotNum

Evi





Paul said:
Hello Evi,



Your help is most gracious. I will try to explain by answering your
questions.



I am using a single table named MusicTable with these fields: SlotNum,
Title, Artist, MusicType, Label, FeeStat, and Duration. Slotnum is unique
and the primary key. I may split this table later but for now this is what I
have.



The form I am using is named "LookupForm" and is currently bound to a query
named simply enough "DataQuery". I put this into the Record Source in the
property sheet for the form.



The query retrieves all of the table fields. I thought I could filter based
on the combo box so I put [Forms]![LookupForm]![SlotNumBox] into the
criteria field of the query because I thought that might get what I wanted.
"SlotNumBox" is the name of the combo box on the form "LookupForm".



My thought was that by doing these things the query would use whatever value
I selected in the combo box. Apparently the query doesn't update the
recordset until it is executed so I now get nothing by selecting a SlotNum.



All I want to do is be able to select the SlotNum value in the combo box
"SlotNumBox" on the form and have the form populate a group of text boxes
with the associated data. The text boxes could be on a sub form, I suppose.
Currently they are just on the form itself.



Hope this helps. What do you think? I look forward to hearing from you.



Paul

Evi said:
Hi Paul, it will help you next time you write to give your field names
because it makes instructions easier to follow. It may also help to tell
us
if you are using Wierdo erhem Access 2007 because so many of the buttons
and
things are in different places.

You can certainly do what you want to do, using a form. (combo boxes don't
do anything in reports, although you can filter reports using a combo box
in
a form).

Filtering a subform is just one way of achieving what you want. I'm just
trying to see what you have got in front of you so I can give you the
appropriate help.

I'm still not getting your description.
Is the form bound to a table or query (ie in the form's design view, when
you click on Properties and click on the Data tab, is there anything
written
next to Record Source?
If it is an unbound form and it doesn't have a subform, do you want the
choices you make with your combo, to open up another form, filtered to
show
only certain records.

If it is a Single or Form (look next to Default View in the Format tab of
Properties) do you want to turn to a specific 'page' or go to a single
record on the form according to what you select with the combo?

Do you have eg a field which gives you the different singers and you want
to
use your combo to filter your form so that all the recordings for that
singer alone are shown?

Is the field which you want to filter a date, a number or text?

I think that your friend was trying to fog you. Access databases are often
called Applications just because either you or one of the many Wizards can
put code into your forms and reports to make things happen automatically.
As
soon as you or the Wizard puts in your first bit of code you can start
calling your database an 'Application' (if you want to impress). Coding is
nowhere near as difficult as it sounds so don't let your friend put you
off.
If you can help us to 'see' what you can see, we can help you to achieve
your goal.

Evi



on
a arrows
at
 
Back
Top