The following SQL statement with 1 where condition works fine, but the Next SQL statement with 2 where conditions does not work, a error message says Run-Time error ‘13’ type mismatch , what is incorrect in the statement when the AND MinID = 15 is added. The table data type in set as number
SQL = "UPDATE MinistryInv2 Set MinID = " & 14 & " WHERE PID = " & Me!ID & ";"
SQL = "UPDATE MinistryInv2 Set MinID = " & 14 & " WHERE PID = " & Me!ID And MinID = 15 & ";"
Something I forgot, where the 14 is, I need to replace that with a number that would come from the first column of a combo box, I tried putting the combo62.column(0) in place of number 14, but it did not work. As you can see, I then dim XX with xx = me.combo62(0) and that did not work.
Dim XX As Integer
XX = Me.Combo62.Column(0)
SQL = "UPDATE MinistryInv2 Set MinID = XX WHERE PID = " & Me!ID & " AND MinID = 15;"