Which event 'triggers' when I use the navigation buttons ?

liamfitz

Registered User.
Local time
Today, 23:36
Joined
May 17, 2012
Messages
240
I have a subform, which I know loads the desired recordset ( passing it a variable/field value from the mainform's recordset ) using a label's 'On Click' event, to test it's loading the correct related subset of data. I'd like this to be triggered automatically, by an event which occurs when I navigate back and forth through the mainform's recordset ( I take it there is at least one, although I've tried several of the most likely i.e On Change, On Data Change, AfterUpdate etc. ) It was suggested 'Current' would work but it returns 'No Current Record' on initially loading the form. Please can someone help. I'd be most grateful. Thanks. :confused:
 
It is on Current.

You could probably get round the error with some error handling. On Error Resume Next may be ok, otherwise the standard

Private Sub Form_Current()
On Error Goto Form_Current_Exit

'Your code here

Form_Current_Exit:
End Sub
 
Thanks. I'll give it a go.
 
That works perfectly. ( It bypasses the initial On Load issue for the first record which is correct anyway in subform ) Very many thanks Sir.
 

Users who are viewing this thread

Back
Top Bottom