Using ComboBox in Form to Display recorded data like a search

T

Torque

Hi there,
I was wondering if anyone could help me out.
I have a form, and I want to change a textbox to a combobox.
I want to be able to use the combobox to display all entries in that field that were recorded,
then when changed, to display all previously recorded information for every field in that form
and to correspond all information for what has been placed into the combobox.
I guess, very similar to a search.

Does this make any sense, maybe im not wording it correctly.

TIA
TORQUE
Jan,06,2007 11:35pm EST


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
 
L

Larry Linson

Torque said:
Hi there,
I was wondering if anyone could help me out.
I have a form, and I want to change a textbox to a combobox.
I want to be able to use the combobox to display all entries in that field
that were recorded,
then when changed, to display all previously recorded information for
every field in that form
and to correspond all information for what has been placed into the
combobox.
I guess, very similar to a search.

Does this make any sense, maybe im not wording it correctly.

I am having some difficulty understanding what it is you want to do... my
real confusion begins at "then when changed, to ...". Do you mean you want
to have a single Combo Box, and, have it display all the Values of a given
Field in the Table, from which the user can choose (and then _what_?). Then,
by some (as-yet-undisclosed) method, have the Combo Box changed to
one-by-one do the same for each other Field in the Table (or Query) that is
the Form's RecordSource?

Larry Linson
Microsoft Access MVP
 
T

Torque

I am having some difficulty understanding what it is you want to do... my
real confusion begins at "then when changed, to ...". Do you mean you want
to have a single Combo Box, and, have it display all the Values of a given
Field in the Table, from which the user can choose (and then _what_?). Then,
by some (as-yet-undisclosed) method, have the Combo Box changed to
one-by-one do the same for each other Field in the Table (or Query) that is
the Form's RecordSource?

Larry Linson
Microsoft Access MVP

Thanks for corresponding

Let me try to better explain myself.

I have a form, and on this form, between textboxes and comboboxes I
have close to 40 items that can be entered. All of which are
referenced to 1 txtbx which contains an ID Number. I know how to
change this to a combo box. What I want to do, is use this 1 combobox
to be able to select from any of the previously entered ID Numbers.
And when a previously entered ID Number is selected, I would like for
all other entries made on that same form that correspond to that ID
Number to be brought up with it.

If I want to look up a past entry, I usually use the (Find) feature
and am able to search for what I may be looking for. But, I'd like to
be able to use the combobox for the ID Numbers to select a previously
entered ID and have all of the information entered for it appear in
the same form with it.

I hope im able to get across what I am trying to do.

Thanks for your help.
TORQUE
 
J

John Vinson

What I want to do, is use this 1 combobox
to be able to select from any of the previously entered ID Numbers.
And when a previously entered ID Number is selected, I would like for
all other entries made on that same form that correspond to that ID
Number to be brought up with it.

Use the Toolbox Combo Box control, with the "magic wand" icon
selected; choose the option "use this combo box to find a record".

This will create an UNBOUND (that's critical!) combo box with a bit of
VBA code which will navigate the form to the selected record.

John W. Vinson[MVP]
 
T

Torque

Use the Toolbox Combo Box control, with the "magic wand" icon
selected; choose the option "use this combo box to find a record".

This will create an UNBOUND (that's critical!) combo box with a bit of
VBA code which will navigate the form to the selected record.

John W. Vinson[MVP]


So, if I change the textbox to a combobox and it is already bound to
my table, because it is my "ID Number" field, then I cannot use it to
switch in between records? Or is there a way to do so?

Thanks
TORQUE
 
J

John Vinson

So, if I change the textbox to a combobox and it is already bound to
my table, because it is my "ID Number" field, then I cannot use it to
switch in between records? Or is there a way to do so?

Correct: you CANNOT use a bound combo box (or textbox or any other
control) to navigate to other records.

Just create another combo box using the toolbox wizard. It's easy, the
wizard walks you right through the process.

You DON'T want to use your bound combo because it would *overwrite*
the ID Number value in whatever record is currently displayed, with
the ID number that you select from the combo box!

John W. Vinson[MVP]
 

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