Fill In The Blanks

  • Thread starter Thread starter orgelizer via AccessMonster.com
  • Start date Start date
O

orgelizer via AccessMonster.com

I should remember how to do this, but my mind seems to have misplaced the
proper cells needed to accomplish what I want.

Specifically, I have a table with equipment info in it (unique ID number,
name, model, serial, etc.). In a separate form, I want to just enter the
unique ID number and have the remainder of the nomenclature fields entered
into their respective locations. How do I do that?

Thanks in advance.
 
I would use a combo box, a query with all the info and insert code into the
"after update" event:

field2 = [combo].column(1)
 
I should remember how to do this, but my mind seems to have misplaced the
proper cells needed to accomplish what I want.

Specifically, I have a table with equipment info in it (unique ID number,
name, model, serial, etc.). In a separate form, I want to just enter the
unique ID number and have the remainder of the nomenclature fields entered
into their respective locations. How do I do that?

Thanks in advance.

If you're trying to DISPLAY the name, model, serial etc. put a combo box on
your form based on a query selecting all the fields from the equipment table;
put textboxes on the form with control source

=comboboxname.Column(n)

where n is the zero based index of the field you want to see.

If you want to copy the contents of the equipment table and store the
information redundantly in a second table... well, you *don't* really want to
do that, believe me. There is no good reason to waste space and risk having
incorrect data stored by doing so.

John W. Vinson [MVP]
 
Just to add a little to what John wrote, if you are selecting a product for
something like an invoice you may want to store the price, which is subject
to change. For information such as model that is not subject to change (a
new model would mean a new record in your equipment table), I agree that
there probably is nothing to be gained by storing the data redundantly.
If you want to select the equipment and go to that record, that is another
matter. In any case, you may want to select the equipment from a combo box,
which can display the product name but store the unique ID, rather than
having a paper list of equipment from which you read the ID number (or
however exactly you would do that).
 
Thanks for your reply -- and your correction of my ambiguity. I did want to
just display the info. I tried your suggestion and received unexpected
results. This happened with a couple of different tables/queries. When I
put used column 1 in the control source, I got the results I was after. But
any other column further "down the road" (i.e., 2, 3, 4, etc) gave me
absolutely no results. I rechecked my syntax, spelling, and everything else
I could think of, but no luck. Any thoughts as to what might be causing that?


Ken
I should remember how to do this, but my mind seems to have misplaced the
proper cells needed to accomplish what I want.
[quoted text clipped - 5 lines]
Thanks in advance.

If you're trying to DISPLAY the name, model, serial etc. put a combo box on
your form based on a query selecting all the fields from the equipment table;
put textboxes on the form with control source

=comboboxname.Column(n)

where n is the zero based index of the field you want to see.

If you want to copy the contents of the equipment table and store the
information redundantly in a second table... well, you *don't* really want to
do that, believe me. There is no good reason to waste space and risk having
incorrect data stored by doing so.

John W. Vinson [MVP]
 
Thanks for your reply -- and your correction of my ambiguity. I did want to
just display the info. I tried your suggestion and received unexpected
results. This happened with a couple of different tables/queries. When I
put used column 1 in the control source, I got the results I was after. But
any other column further "down the road" (i.e., 2, 3, 4, etc) gave me
absolutely no results. I rechecked my syntax, spelling, and everything else
I could think of, but no luck. Any thoughts as to what might be causing that?

Check the Column Count property of the combo box. If the column count is 2, as
I'm guessing, then you can only see columns (0) and (1).

John W. Vinson [MVP]
 
That was it. Thanks for the reply.

Ken
Thanks for your reply -- and your correction of my ambiguity. I did want to
just display the info. I tried your suggestion and received unexpected
[quoted text clipped - 3 lines]
absolutely no results. I rechecked my syntax, spelling, and everything else
I could think of, but no luck. Any thoughts as to what might be causing that?

Check the Column Count property of the combo box. If the column count is 2, as
I'm guessing, then you can only see columns (0) and (1).

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

Back
Top