help suffering badly

itsglitzy

Registered User.
Local time
Today, 09:53
Joined
Nov 12, 2004
Messages
30
hi all

on a userform i have a combo box with values, what i need is; if i were to select a value in my combobox, this would populate my input box below will with a value, please help getting ,mega pressure at work :confused:
 
why would you need to populate an inputBox with a ComboBox value? You can use the ComboBox value direct
Col
 
Event

OK. On the Combo from which you select your value you want to add something like (see below) to the AfterUpdate Event:

Code:
Me.your field name here = "value you wish field to update to"

Hope that is what you were after.
Regards,
Phil.
 
hi guys thx but....

my combo box i.e has

jan, feb etc when I select jan i need textbox1 to have 28

jan, feb etc when I select feb i need textbox1 to have 35

If ComboBox1.Value = "jan" Then
textbox1.Value = "28"

this is what isnt working ...... :(
 
Aha! you don't mean InputBox in the true sense, you mean a TextBox.

Ok in the AfterUpdate of the ComboBox put this

Code:
If Me.ComboBox = "Jan" Then

Me.FieldName = 28

ElseIf Me.ComboBox = "Feb" Then

Me.FieldName = 35

etc etc

only strings go in quotes.

Which is what Scouser said

Col
 
one last thing

it all works but the changes only take effect when you click in the textbox how can i get it to change without clicking in the textbox ?? :confused:
 
oh no >>>>

hi there all your help was much appreciated, now that it all works i hAVE A Macro behind command button 1 which looks at the variables in combo box1 and text box, tne command button has call macro on it but this doesnt work any ideas :confused: as you can see im a newbie
 
Why not just use a second column in your combo box which already has the related numbers added to it.
Then you don't need any code at all
 

Users who are viewing this thread

Back
Top Bottom