I am try to run an insert query using double quotation marks around my varible, and receive "Expect end of statement" error message. Why does this seemingly easy task has to be so hard? Okay, what my wine for today.
Private Sub cbx_BU_Change()
Dim dBase As Database
Dim stringSQL As String
Set dBase = CurrentDb
stringSQL = "SELECT BusUnit.BUnit INTO t_SelectedBU FROM BusUnit WHERE (((BusUnit.BUnit)=" & ""cbx.BU"" & "));"
'"INSERT INTO t_SelectedBU ( BUnit) SELECT BusUnit.BUnit FROM BusUnit WHERE (((BusUnit.Parent)= " & cbx.BU & "));"
dBase.Execute stringSQL, dbFailOnError
MsgBox "Done"
End Sub