harmankardon
Registered User.
- Local time
- Today, 11:39
- Joined
- Aug 8, 2011
- Messages
- 71
Hello all,
I have a form called frmDataEntry that is used for entering data.
I also have a navigation form called frmNavigation that has a series of navigation buttons (using the new Access 2010 nagivation controls) and a navigation subform control.
When you click on one of the navigation buttons (which are setup as a row of tabs at the top of frmNavigation), a form will be loaded into the navigation subform control.
I have a navigation button called btnDataEntry and when clicked, loads frmDataEntry into the navigation subform control.
This part all works as expected. The problem I am having is that when frmDataEntry is loaded into the navigation subform control, the .IsLoaded property of frmDataEntry remains False, whereas if I open frmDataEntry independently of the navigation form, the .IsLoaded property becomes True.
This is a problem because I have created a custom right-click shortcut menu for frmDataEntry that has a control which runs a function that is located in frmDataEntry's code module. The .OnAction property of the menu control is setup as follows:
This right-click functionality works great when frmDataEntry is opened indenpendatly of the navigation form (I can right-click on a record and click on my menu control to run the ReserveDrawing fuction), but when I open it through the navigation from and try to use the menu control that runs the above function, I get an Access error saying it can't find the function. Note that making the ReserveDrawing function Public doesn't help because as far as Access is concerned, the .IsLoaded property is false for frmDataEntry, so frmDataEntry's code module is not available.
Has anyone experienced similar problems?
I think the only solution is to move the ReserveDrawing function to it's own global module, which isn't ideal because then I have to pass about 20 variables to the function (assuming I'm even able to pass them in the first place due to the form .IsLoaded being false, even though I can see the form on my screen).
I have a form called frmDataEntry that is used for entering data.
I also have a navigation form called frmNavigation that has a series of navigation buttons (using the new Access 2010 nagivation controls) and a navigation subform control.
When you click on one of the navigation buttons (which are setup as a row of tabs at the top of frmNavigation), a form will be loaded into the navigation subform control.
I have a navigation button called btnDataEntry and when clicked, loads frmDataEntry into the navigation subform control.
This part all works as expected. The problem I am having is that when frmDataEntry is loaded into the navigation subform control, the .IsLoaded property of frmDataEntry remains False, whereas if I open frmDataEntry independently of the navigation form, the .IsLoaded property becomes True.
This is a problem because I have created a custom right-click shortcut menu for frmDataEntry that has a control which runs a function that is located in frmDataEntry's code module. The .OnAction property of the menu control is setup as follows:
Code:
Set cmbControl = .Controls.Add(msoControlButton)
cmbControl.Caption = "UpRev This Drawing"
cmbControl.BeginGroup = True
cmbControl.OnAction = "=ReserveDrawing()"
This right-click functionality works great when frmDataEntry is opened indenpendatly of the navigation form (I can right-click on a record and click on my menu control to run the ReserveDrawing fuction), but when I open it through the navigation from and try to use the menu control that runs the above function, I get an Access error saying it can't find the function. Note that making the ReserveDrawing function Public doesn't help because as far as Access is concerned, the .IsLoaded property is false for frmDataEntry, so frmDataEntry's code module is not available.
Has anyone experienced similar problems?
I think the only solution is to move the ReserveDrawing function to it's own global module, which isn't ideal because then I have to pass about 20 variables to the function (assuming I'm even able to pass them in the first place due to the form .IsLoaded being false, even though I can see the form on my screen).