I've created a bunch of forms with their own navigation buttons
(people were complaining the standard set was too small.)  So I made
them a nice 0.25" each etc...

I have about 16 forms with these buttons.  What I'm wondering is can
I create a module to hold this code and have the forms call it up
instead of having to write the code for 16 forms.

For example:  To move to the first record I have:

Private Sub cmdbtnFirstRecord_Click()
On Error GoTo Err_cmdbtnFirstRecord_Click

     DoCmd.GoToRecord , , acFirst

Exit_cmdbtnFirstRecord_Click:
     Exit Sub

Err_cmdbtnFirstRecord_Click:
     MsgBox Err.Description
     Resume Exit_cmdbtnFirstRecord_Click

End Sub

Is there a way to make this a global function for all forms, like a
function?

I'm thinking:

Function cmdbtnFirstRecord_Click()
On Error GoTo Err_cmdbtnFirstRecord_Click

     DoCmd.GoToRecord , , acFirst

Exit_cmdbtnFirstRecord_Click:
     Exit Function

Err_cmdbtnFirstRecord_Click:
     MsgBox Err.Description
     Resume Exit_cmdbtnFirstRecord_Click

End Function


How would I go about calling the function?  Or is there a better way?

Thanks.










 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to