Hit there thanx for looking, i need help in passing a form to a module. Ive made a module that deals with navigation and 2 buttons that are common across 10 forms.
What im trying to do is pass the form that currently has focus, so i can use the underlying module code.
in the form control button I tryed:
Private Sub cmdAdd_Click()
MyModule.cmdAdd_Click (Form_frmElectrician)
End Sub
------------
in the module:
Option Compare Database
Dim formName As Forms
Public Sub cmdAdd_Click(formName As Form)
On Error GoTo Err_cmdAdd_Click
Me.AllowAdditions = True
cmdclose.SetFocus
currentForm.cmdAdd.Visible = False
currentForm.cmdEdit.Visible = False
currentForm.cmdclose.Caption = "Close"
blah, blah
Hopefully you can see what im trying to do
Thanx in advance for any and all help.
Kind regards
h3lm3t
What im trying to do is pass the form that currently has focus, so i can use the underlying module code.
in the form control button I tryed:
Private Sub cmdAdd_Click()
MyModule.cmdAdd_Click (Form_frmElectrician)
End Sub
------------
in the module:
Option Compare Database
Dim formName As Forms
Public Sub cmdAdd_Click(formName As Form)
On Error GoTo Err_cmdAdd_Click
Me.AllowAdditions = True
cmdclose.SetFocus
currentForm.cmdAdd.Visible = False
currentForm.cmdEdit.Visible = False
currentForm.cmdclose.Caption = "Close"
blah, blah
Hopefully you can see what im trying to do
Thanx in advance for any and all help.
Kind regards
h3lm3t