N
Neal B. via AccessMonster.com
I have created a custom menu with the code from the button on my form in a
module. I'm using the exact same coding for my menu item as the button on my
fom, only replaced with public, function instead of sub and focus on active
form. I'm getting ..."external name not defined".. error on [tblJOProfile.
Comanyid] below. Here's my code:
Public Function ListJOs_Click()
Dim frmActive As Form
Set frmActive = Screen.ActiveForm
DoCmd.OpenForm "frmListJOs", WhereCondition:="tblJOProfile.Companyid=" &
[tblJOProfile.Companyid]
End Function
Where I use the button on my form it works perfectly. Same code, just from
the menu. Can anyone see where I'm missing something??
Thanks,
Neal
module. I'm using the exact same coding for my menu item as the button on my
fom, only replaced with public, function instead of sub and focus on active
form. I'm getting ..."external name not defined".. error on [tblJOProfile.
Comanyid] below. Here's my code:
Public Function ListJOs_Click()
Dim frmActive As Form
Set frmActive = Screen.ActiveForm
DoCmd.OpenForm "frmListJOs", WhereCondition:="tblJOProfile.Companyid=" &
[tblJOProfile.Companyid]
End Function
Where I use the button on my form it works perfectly. Same code, just from
the menu. Can anyone see where I'm missing something??
Thanks,
Neal