insert value from combo to textfied

mkkashif

Registered User.
Local time
Today, 03:52
Joined
Sep 1, 2004
Messages
88
please see the attach file.i want that if user select a value from the combobox it insert automaticaly in the textfield and if select another value it's automaticaly insert with , sign.
like that 246,247,248
how it possible.
any help
 

Attachments

MK,

Get your form in Design View.
Set the form's "HasModule" property to Yes.

Put this code in the AfterUpdate event of Combo0:

Code:
If Len(Me.Text2) = 0 Then
   Me.Text2 = Me.Combo0
Else
   Me.Text2 = Me.Text2 & ", " & Me.Combo0
End If

Then get rid of the DefaultValue for Text2.

Be aware that when you close the form, the values in Text2 will
disappear. They are not "stored" anywhere.

Wayne
 
showing , sign with first record

thanks very much wayne it's working fine.but it's also shows the , sign with first value how can i remove that.
your help is great thanks again
 
MK,

That's what the If statement is supposed to do. Did you put it in?

If Me.Text2 has a length = 0, don't put a comma, just assign it.

Wayne
 
i dont understand

dear wayne
i don't understand what you are saying .is not possible.
if possible what is the code.
sorry for some misunderstanding
 

Users who are viewing this thread

Back
Top Bottom