populate textboxes in the form according to value selected in combo box

RunLikeaRiver

Registered User.
Local time
Today, 16:04
Joined
Oct 27, 2005
Messages
18
hi

when a value is selected in a combo box then values shud be set to the textboxes in the same form
plz let me know hw to do it.

Please reply ASAP
thnx
 
One way of doing this is using a select case on the on chage event for the dropdown box

for example

dim mydropdownvalue
mydropdownvalue = me.combobox.value

select case "mydropdownvalue"
case "value1"
me.textbox.value ="New value1"
case "value2"
me.textbox.value ="New Value2"
end select
 
You could also use the AfterUpdate event of the ComboBox like so:
Me.TextBox1 = Me.ComboBox.Column(0)
Me.TextBox2 = Me.ComboBox.Column(1)

The change event occurs on every keystroke. The AfterUpdate event only occurs once after the user has made a selection.
 

Users who are viewing this thread

Back
Top Bottom