version 6.41 0 Form1 238 268 0 0 0 0 Sub designer addform(Form1,"Form1","",220,220,220)@ addtextbox(form1,TextBox1,35,45,95,20,"",255,255,255,0,0,0,True,True,False,8)@ addcombo(form1,ComboBox1,35,45,110,20,"",255,255,255,0,0,0,True,True,0,8)@ End Sub @EndOfDesignText@ Sub Globals 'Declare the global variables here. End Sub Sub App_Start Form1.Show End Sub Sub Textbox1_lostfocus s=StrLength(StrReplace(textbox1.Text," ","")) 'Not to accept 'spaces' or blank entry i=0 : ex=0 If textbox1.Text<>"" AND s>0 Then If combobox1.Count>0 Then For i=0 To combobox1.Count-1 If textbox1.Text= combobox1.Item(i) Then ' check wether input is already existing' ex=1 End If Next End If If ex=0 Then combobox1.Add(textbox1.Text) Else Msgbox("already exist!") End If End If End Sub Sub Combobox1_SelectionChanged(Index,Value) textbox1.Text=Combobox1.Item(Combobox1.SelectedIndex) End Sub