Hi all,
Is it possible to pass an access constant as a argument to a function?
I have a button called Last with a sub on the click event that runs DoCmd.GoToRecord , , acLast
I want to replace that with a call to a Function like this =GoToRecord("acLast") -- passing in the access constant acFirst, acNext as required.
This is my code which doesn't work:
Thanks
Melt
Is it possible to pass an access constant as a argument to a function?
I have a button called Last with a sub on the click event that runs DoCmd.GoToRecord , , acLast
I want to replace that with a call to a Function like this =GoToRecord("acLast") -- passing in the access constant acFirst, acNext as required.
This is my code which doesn't work:
Code:
Private Function GoToRecord(strPosition As AccessObjectProperty)
DoCmd.GoToRecord , , strPosition
End Function
Thanks
Melt