bentheimmigrant
Lost & confused
- Local time
- Today, 19:21
- Joined
- Aug 21, 2015
- Messages
- 60
I've got a continuous form, on which I need to use an OnCurrent event to check that the first record has a certain value.
So I have an OnCurrent sub like so:
However, the MoveFirst of course means that every time I click on a subsequent record, I'm immediately returned to the first record.
If I remove the OnCurrent call, the queries I need to run to keep the form up to date won't run.
Is there some way to copy a recordset as a readonly object, so I can't affect the form?
So I have an OnCurrent sub like so:
Code:
Private Sub Form_Current()
Dim FormRst As Recordset
FormRst.MoveFirst
' Code to check that the first item is as expected
If I remove the OnCurrent call, the queries I need to run to keep the form up to date won't run.
Is there some way to copy a recordset as a readonly object, so I can't affect the form?