Disable the dropdown on a combo box

jmersing

Well-known Member
Joined
Apr 14, 2004
Messages
887
I have a combo box that reads a bar code and auto tabs to the next field. It has an after update event that retrieves the correct record. I do not want the users to manually enter a bar code # with the keypad, and I do not want them to see the dropdown window.
Can I do this?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Why are you using a combobox?

Could you not use a textbox?

How is the control 'reading' a bar code?
 
Upvote 0
The focus is set to the combo box it will detect the scan on it's own. Then I run this after update statement:

Private Sub cmbScan_AfterUpdate()
' Find the record that matches the control.

Dim rs As Object
Dim intresult As Integer

Set rs = Me.Recordset.Clone
rs.FindFirst "[eventid] = " & Str(Nz(Me![cmbScan], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Me.signout.SetFocus
If Me.signout.Text = "" Then
Me.signout = Time()
Me.signoutdate = Now()
DoCmd.SetWarnings off
DoCmd.OpenQuery "qryAppendStatus"

Else
Me.signin = Time()
Me.signindate = Now()
'Me.signout = Me.signout
DoCmd.SetWarnings off
DoCmd.OpenQuery "qryNewUpdate"
End If
Me.rfid.SetFocus


The recordsource for the combobox is :

SELECT [sign out record].EventID, [sign out record].BadgeID, [sign out record].[Employee Name]
FROM [sign out record]
ORDER BY [sign out record].[Employee Name];
 
Upvote 0

Forum statistics

Threads
1,221,899
Messages
6,162,682
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top