Data entry form

Z

zordanj

Hello,
I have created data entry form in MS access 2007. I have a vendor table in
which all vendor details are present. In a different form i have provided a
combo box for the vendor ID. I want the vendor name, vendor address, city,
postal code to be automatically generated when the user selects a particular
vendor id.
 
T

tina

I want the vendor name, vendor address, city,
postal code to be automatically generated when the user selects a particular
vendor id.

well, if you want to *store* the vendor data in the table underlying your
data entry form, then i'd say STOP. really, you don't want to do that at
all - it's unnecessary duplication of data and breaks normalization rules.

if you want to just *display* the vendor data in the data entry form, after
choose a vendor from the combobox control, just do the following: make sure
the fields you need are included in the combobox control's RowSource. add an
unbound textbox control to the form, and set its' ControlSource property to
the first column of the combobox control that you want to display. combobox
columns have a zero-based index, so if you want to see the value from the
second column, the expression would be

=ComboboxControlName.Column(1)

showing the value from the third column, the expression would be

=ComboboxControlName.Column(2)

and so on. add an unbound textbox control for each value from the combobox
that you want to display. or you can concatenate values to show in a single
textbox, as

=ComboboxControlName.Column(1) & " " & ComboboxControlName.Column(2)

hth
 
T

Tom van Stiphout

On Tue, 11 Nov 2008 18:17:01 -0800, zordanj

"generated"? I am assuming you mean "displayed". Let's say you have a
form with a dropdown of vendors, and several textbox controls that
should receive the name, address, etc.

One way to implement that is to have the RowSource query for the
dropdown include these additional columns of information. In the
dropdown these columns can be hidden (see ColumnWidths property). Then
in the textbox control's ControlSource property write something like:
=MyDropdown.Column(2)
etc.

-Tom.
Microsoft Access 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