Could you help me please? I have a problem with a if sentence and a query: I need to pass the POSITION.OldValue to another form but it is getting the new value instead.Thank you.
Expand|Select|Wrap|Line Numbers
- Private Sub Position_BeforeUpdate(Cancel As Integer)
- Dim str As String
- If Me.POSITION.OldValue <> Me.POSITION.value Then
- str = "INSERT INTO tbl_GCDS_Operations_Positions_fills " _
- & "([REPLACEMENT FOR],[POSITION],[POSITION NAME],[Snr Dir],[UNIT],[REPLACEMENT LAST DATE],[CompanyStartDate],[Position Status]) VALUES " _
- & "('" & Me![NAME] & "','" & Me![POSITION] & "','" & Me![POSITION] & "','" & Me![Reporting Level 1] & "','" & Me![Group] & "','" & Me![Leave Date] & "','" & Me![Company Start Date] & "','" & "Open" & "'); " _
- 'Debug.Print str
- CurrentDb.Execute str
- End If
- End Sub