NJudson
Who farted?
- Local time
- Today, 00:01
- Joined
- Feb 14, 2002
- Messages
- 297
I'm using Access 2k and I've created a form ("frmAudits") with a subform ("subfrmImportSwitchData"). I've placed an optiongroup inside the subform that I'd like to pass the values to a module, but I keep getting the error, "Microsoft Access can't find the form 'SubForm' referred to in a macro or expression or Visual Basic Code."
In the General Declarations area in the module I've placed:
Public subfrmImportSwitchData As Form_subfrmImportSwitchData
Public optgrpsubfrmImportSwitchDataSelectSwitch As OptionGroup
Public optsubfrmImportSwitchDataFortWayne1 As OptionButton
Public optsubfrmImportSwitchDataFortWayne2 As OptionButton
Public optsubfrmImportSwitchDataAlexandria As OptionButton
Public optsubfrmImportSwitchDataLafayette As OptionButton
Public optsubfrmImportSwitchDataVidor As OptionButton
in my function to set the variables I have:
Set subfrmImportSwitchData = Forms!subfrmImportSwitchData
Set optgrpsubfrmImportSwitchDataSelectSwitch = subfrmImportSwitchData.optgrpsubfrmImportSwitchDataSelectSwitch
Set optsubfrmImportSwitchDataFortWayne1 = subfrmImportSwitchData.optsubfrmImportSwitchDataFortWayne1
Set optsubfrmImportSwitchDataFortWayne2 = subfrmImportSwitchData.optsubfrmImportSwitchDataFortWayne2
Set optsubfrmImportSwitchDataAlexandria = subfrmImportSwitchData.optsubfrmImportSwitchDataAlexandria
Set optsubfrmImportSwitchDataLafayette = subfrmImportSwitchData.optsubfrmImportSwitchDataLafayette
Set optsubfrmImportSwitchDataVidor = subfrmImportSwitchData.optsubfrmImportSwitchDataVidor
but it's crapping out on the line:
Set subfrmImportSwitchData = Forms!subfrmImportSwitchData
Is it not possible to pass values from a subform? I would have thought so but it doesn't seem to find or recognize the subform? Any ideas on something I'm overlooking? Thanks for any assistance.
In the General Declarations area in the module I've placed:
Public subfrmImportSwitchData As Form_subfrmImportSwitchData
Public optgrpsubfrmImportSwitchDataSelectSwitch As OptionGroup
Public optsubfrmImportSwitchDataFortWayne1 As OptionButton
Public optsubfrmImportSwitchDataFortWayne2 As OptionButton
Public optsubfrmImportSwitchDataAlexandria As OptionButton
Public optsubfrmImportSwitchDataLafayette As OptionButton
Public optsubfrmImportSwitchDataVidor As OptionButton
in my function to set the variables I have:
Set subfrmImportSwitchData = Forms!subfrmImportSwitchData
Set optgrpsubfrmImportSwitchDataSelectSwitch = subfrmImportSwitchData.optgrpsubfrmImportSwitchDataSelectSwitch
Set optsubfrmImportSwitchDataFortWayne1 = subfrmImportSwitchData.optsubfrmImportSwitchDataFortWayne1
Set optsubfrmImportSwitchDataFortWayne2 = subfrmImportSwitchData.optsubfrmImportSwitchDataFortWayne2
Set optsubfrmImportSwitchDataAlexandria = subfrmImportSwitchData.optsubfrmImportSwitchDataAlexandria
Set optsubfrmImportSwitchDataLafayette = subfrmImportSwitchData.optsubfrmImportSwitchDataLafayette
Set optsubfrmImportSwitchDataVidor = subfrmImportSwitchData.optsubfrmImportSwitchDataVidor
but it's crapping out on the line:
Set subfrmImportSwitchData = Forms!subfrmImportSwitchData
Is it not possible to pass values from a subform? I would have thought so but it doesn't seem to find or recognize the subform? Any ideas on something I'm overlooking? Thanks for any assistance.