Dachande11
Registered User.
- Local time
- Today, 23:06
- Joined
- May 1, 2001
- Messages
- 41
Hello to anybody who can help,
I am trying to update a table by using the code below, i know that it works without the criteria but as soon as i use the 'Where' things go wrong.
I currently get a type mismatch failure, if i change the = to like it runs without error but does not update the table.
Private Sub Update_SAC_Click()
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
cn.Execute "UPDATE SAC_Periods INNER JOIN SAC_SOrg_Temp ON SAC_Periods.Channel = SAC_SOrg_Temp.Channel SET SAC_Periods.P01 = [niv] WHERE (((SAC_SOrg_Temp.Period)=" & "p01" & "));"
End Sub
Thanks to anybody who can help.
I am trying to update a table by using the code below, i know that it works without the criteria but as soon as i use the 'Where' things go wrong.
I currently get a type mismatch failure, if i change the = to like it runs without error but does not update the table.
Private Sub Update_SAC_Click()
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
cn.Execute "UPDATE SAC_Periods INNER JOIN SAC_SOrg_Temp ON SAC_Periods.Channel = SAC_SOrg_Temp.Channel SET SAC_Periods.P01 = [niv] WHERE (((SAC_SOrg_Temp.Period)=" & "p01" & "));"
End Sub
Thanks to anybody who can help.
Last edited: