To modify your existing code to handle a combination of numbers and letters for the ID, you are already on the right track with your strWhere assignment. The key is to ensure that you treat the ID as a string, which you are doing correctly by enclosing it in single quotes. Here's the relevant part of your code:
strWhere = "[RFQ_num] = '" & vID & "'"
This line constructs the strWhere string correctly for IDs that contain both letters and numbers. Since you are using single quotes around vID, it will work for values like 765TR-123, YT567, 12345, or ABC-1.
You do not need to change anything else in your code for it to work with alphanumeric IDs. Just ensure that the RFQ_num field in your database is of a text type (not numeric) to accommodate these values.
Here is your complete button click event with the necessary checks:
Private Sub Command19_Click()
Dim vID As Variant
Dim strWhere As String
vID = InputBox("Enter the ID to display on the report:", "Enter Record ID")
' If user cancels or leaves it blank - do nothing
If vID = "" Then Exit Sub
' No need to check if numeric since it can be alphanumeric
' Just ensure the input is not empty
strWhere = "[RFQ_num] = '" & vID & "'"
DoCmd.OpenReport "MCT Report", acViewPreview, , strWhere
End Sub
This should allow your report to open with the specific record based on the ID entered by the user, regardless of whether it is purely numeric or alphanumeric.