M mkkashif Registered User. Local time Today, 03:52 Joined Sep 1, 2004 Messages 88 Oct 6, 2004 #1 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 sample.zip sample.zip 15.1 KB · Views: 127
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
W WayneRyan AWF VIP Local time Today, 11:52 Joined Nov 19, 2002 Messages 7,120 Oct 6, 2004 #2 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
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
M mkkashif Registered User. Local time Today, 03:52 Joined Sep 1, 2004 Messages 88 Oct 6, 2004 #3 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
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
W WayneRyan AWF VIP Local time Today, 11:52 Joined Nov 19, 2002 Messages 7,120 Oct 6, 2004 #4 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
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
M mkkashif Registered User. Local time Today, 03:52 Joined Sep 1, 2004 Messages 88 Oct 6, 2004 #5 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
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