I am trying to have a text box show the value that is associated with a certain value. I have a table with 2 columns, [Error_Code] and [Type]. I want to have a combobox with Error_Codes (which works) and whenever a selection is made, the [Type] will appear in the textbox. For some reason, I have been testing this to a msgbox, will change later.
Dim rst As DAO.Recordset
Dim ERtype As String
Set rst = CurrentDb.OpenRecordset("select * from Error_Table where [Code]='" & Me!cb_Error.Value & "'")
MsgBox "testing: " & rst!Type_
rst.Close
Set rst = Nothing
This seems to return run-time error 3265, item not found. I have looked this up and my table name and fields are correct. Any ideas what is going on?