combobox
-
Hello, I am unable to get my combobox to load. I have the user iner or scan a number into the textbox. This calls a procedure and walla.....My CB should populate but no. Can someone give me some suggestions from my code? I get an object required error right here :mad: Also, how can I get it to accept a scan instead of a user hitting enter after entering the data? Thank you very much. Dim batchnumber As String Dim GetBatchNO As Integer strValue = Trim(UCase(txtbatchnum.Text)) Me.MousePointer = vbNormal If strValue = 0 Then MsgBox ("Invalid Batch Number!") txtbatchnum_GotFocus Me.MousePointer = vbNormal Exit Sub End If txtbatchnum.Text = GetBatchNO 'ado.dbo_ShippingGetTnocwayFromBatchno GetBatchNO :mad: batchnumber = Trim(ado.rsdbo_ShippingGetTnocwayFromBatchno!Tnocway) & "" ado.rsdbo_ShippingGetTnocwayFromBatchno.Close comboTnum.Clear Do While Not ado.rsdbo_ShippingGetTnocwayFromBatchno.EOF comboTnum.AddItem batchnumber ado.rsdbo_ShippingGetTnocwayFromBatchno.MoveNext Loop End Sub