Update table from form and subform

Steven

Registered User.
Local time
Yesterday, 23:52
Joined
Mar 5, 2011
Messages
15
Hi All,

I want to update a record in a table from within a subform.
This "Frm_Projecten" is my master form and I want to use this key "PROJNR_SK" to match it with the same key on the subform.
What am I missing here.

Thx in advance,
Steven.

Dim SQL As String
If LooptijdProj > 150 Then
SQL = "UPDATE Invloedsfactoren " & _
"SET InvlFctr_Perc = 0,8 " & _
"WHERE PROJNR_SK = " & Frm_Projecten!PROJNR_SK & _
" AND INVLFCTR_SK = 2401"
DoCmd.SetWarnings False
DoCmd.RunSQL SQL
DoCmd.SetWarnings True
End If
 

Users who are viewing this thread

Back
Top Bottom