Hello,
I am trying to return a value from a table based on the value that a user selects from a combo box. I am trying to get my SQL statement to work and I keep getting an error that says Incomplete Query Clause. I have tried all kinds of options I found online but I can't seem to get it right. Any help would be greatly appreciated. Thanks in advance.
Dim strSQL As String
strSQL = "Select ID FROM 'Computer Inventory' " _
& "WHERE 'PC Name' = " & Me.cboComputerName.Value & ""
CurrentDb.Execute strSQL, dbFailOnError
I am trying to return a value from a table based on the value that a user selects from a combo box. I am trying to get my SQL statement to work and I keep getting an error that says Incomplete Query Clause. I have tried all kinds of options I found online but I can't seem to get it right. Any help would be greatly appreciated. Thanks in advance.
Dim strSQL As String
strSQL = "Select ID FROM 'Computer Inventory' " _
& "WHERE 'PC Name' = " & Me.cboComputerName.Value & ""
CurrentDb.Execute strSQL, dbFailOnError