Textbox Automatically Fill in with A value

G

Guest

I used an unbound textbox which automatically fill in with a value after I
select an item from a combo box on a form (e.g., select a Product ID in a
combo box, and have the Product Name automatically display in a textbox)? "

I had came across this in The Access Web. It does answer part of my
question. However in the form, there are more than 1 record. Once I go to the
2nd row and I select another Product ID int eh Combo Box, the 1st record
automatically was updated.

How should I go about doing this?
 
R

Rick Brandt

fel said:
I used an unbound textbox which automatically fill in with a value
after I select an item from a combo box on a form (e.g., select a
Product ID in a combo box, and have the Product Name automatically
display in a textbox)? "

I had came across this in The Access Web. It does answer part of my
question. However in the form, there are more than 1 record. Once I
go to the 2nd row and I select another Product ID int eh Combo Box,
the 1st record automatically was updated.

How should I go about doing this?

You cannot make an unbound textbox have a different value per-record in a
continuous form.

If instead of using code to "push" the value from the ComboBox into the unbound
TextBox (which I assume comes from a column in the ComboBox other than the one
displayed after making an entry) you just used a ControlSource expression of...

=ComboBoxName.Column(n)

....where 'n' is the zero-based column position that you want displayed then that
would allow a different value to be displayed per row.
 
G

Guest

Hi Rick, thanks for your reply. Am I to understand that I should put a 'n'
after the Column? Mine is [cboProductName].[Column](1).

Please explain more in details.
 
R

Rick Brandt

fel said:
Hi Rick, thanks for your reply. Am I to understand that I should put
a 'n' after the Column? Mine is [cboProductName].[Column](1).

No. I meant replace n in my example with the appropriate column position you
want to see.
 

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