TheVicar75
Technical User
Hi, i've got an sql statement that doesn't work.
I get runtime error 7874, what's wrong, all names are spelled correctly.
Private Sub cbo_SelectSupplier_AfterUpdate()
Dim StrSQL As String
StrSQL = "SELECT tbl_Demerit_0900_Overzicht_All.* "
StrSQL = StrSQL & " FROM tbl_Demerit_0900_Overzicht_All "
StrSQL = StrSQL & " WHERE tbl_Demerit_0900_Overzicht_All.RelationName = " & Forms!frm_Supplier_Evaluation!cbo_SelectSupplier & ");"
DoCmd.OpenQuery StrSQL
End Sub
I get runtime error 7874, what's wrong, all names are spelled correctly.
Private Sub cbo_SelectSupplier_AfterUpdate()
Dim StrSQL As String
StrSQL = "SELECT tbl_Demerit_0900_Overzicht_All.* "
StrSQL = StrSQL & " FROM tbl_Demerit_0900_Overzicht_All "
StrSQL = StrSQL & " WHERE tbl_Demerit_0900_Overzicht_All.RelationName = " & Forms!frm_Supplier_Evaluation!cbo_SelectSupplier & ");"
DoCmd.OpenQuery StrSQL
End Sub