Hello everyone,
I keep getting a syntax error in my update statement. The only thing that I notice is
that although the columns in my table have the same name as the fields on the form the compiler keeps changing the name eg
strSQL = strSQL & "', Equipment='" & Me![equipment] (compiler format)
should read
strSQL = strSQL & "', Equipment='" & Me![Equipment].
Also I am trying to format the where clause criteria with a combo box that has two columns. I am wondering if this is giving the error but the compiler does not highlight it.
In the combo box's after update event this works fine
Criteria = "[AirlineCode] &' '& [flightnuminout]" = " & [cboAdhoc]"
rsCust.FindFirs t Criteria.
However I am not sure how to concatenate two columns from the same table in the where clause.
I think maybe
1. 'strSQL = strSQL & " WHERE "[AirlineCode] &"' '"& [Flightnuminout]" = " & [cboAdhoc]"
2.strSQL = strSQL & "' WHERE AirlineCode = '" & [cboAdhoc] & ""
3. strSQL = strSQL & "' WHERE AirlineCode And Flightnuminout= '" & [cboAdhoc] & ""
I keep getting a syntax error in my update statement. The only thing that I notice is
that although the columns in my table have the same name as the fields on the form the compiler keeps changing the name eg
strSQL = strSQL & "', Equipment='" & Me![equipment] (compiler format)
should read
strSQL = strSQL & "', Equipment='" & Me![Equipment].
Also I am trying to format the where clause criteria with a combo box that has two columns. I am wondering if this is giving the error but the compiler does not highlight it.
In the combo box's after update event this works fine
Criteria = "[AirlineCode] &' '& [flightnuminout]" = " & [cboAdhoc]"
rsCust.FindFirs t Criteria.
However I am not sure how to concatenate two columns from the same table in the where clause.
I think maybe
1. 'strSQL = strSQL & " WHERE "[AirlineCode] &"' '"& [Flightnuminout]" = " & [cboAdhoc]"
2.strSQL = strSQL & "' WHERE AirlineCode = '" & [cboAdhoc] & ""
3. strSQL = strSQL & "' WHERE AirlineCode And Flightnuminout= '" & [cboAdhoc] & ""
Comment