I am basically self taught in MS Access, Excel and VBA in general. I am attempting to get a form to auto populate an unbound Text box when the value in Combo Box is changed. I have set the following code in the AfterUpdate section of that combo box.
When I select the combo box and change the value, I get Run-Time Error '3131' Syntax error in FROM clause
My code is below. Any help would be greatly appreciated
.
Private Sub Striker_1_SN_AfterUpdate()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Select [Description] FROM db_tbl_Astea Tups" & "Where [Serial No#]= '" & Me.[Striker 1 SN] & "'")
Me.[txt_Striker 1 Description] = rs![Description]
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
When I select the combo box and change the value, I get Run-Time Error '3131' Syntax error in FROM clause
My code is below. Any help would be greatly appreciated
.
Private Sub Striker_1_SN_AfterUpdate()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Select [Description] FROM db_tbl_Astea Tups" & "Where [Serial No#]= '" & Me.[Striker 1 SN] & "'")
Me.[txt_Striker 1 Description] = rs![Description]
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub