![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
My main database is "Clubs.AccDb" I have a reference in the Clubs database to "Utilities.AccDb or AccDe". Within Utilities a have a progress meter form "ProgressMeterRainbow" and a class module "ClsMeterRainbow" which is used to open, close and update the meter. How do I set a reference to ClsMeterRainbow from the main Clubs database I have trie Dim PMeterRainbow As New Utilities.ClsPMeterRainbow and Dim PMeterRainbow As New ClsPMeterRainbow. Both give a compile error of User-defined type not defined Thanks Phil |
#3
| |||
| |||
|
|
On May 6, 12:05*am, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote: My main database is "Clubs.AccDb" I have a reference in the Clubs database to "Utilities.AccDb or AccDe". Within Utilities a have a progress meter form "ProgressMeterRainbow" and a class module "ClsMeterRainbow" which is used to open, close and update th e meter. How do I set a reference to ClsMeterRainbow from the main Clubs database I have trie Dim PMeterRainbow As New Utilities.ClsPMeterRainbow and Dim PMeterRainbow As New ClsPMeterRainbow. Both give a compile error of User-defined type not defined Thanks Phil Hi Phil, When you have a reference from Clubs to Utilities, then you can open the ProgressMeterRainbow form Clubs. As far as I know, that should not be a problem. Imb. |
#4
| |||
| |||
|
|
On 05/05/2011 23:24:00, imb wrote: On May 6, 12:05*am, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote: My main database is "Clubs.AccDb" I have a reference in the Clubs database to "Utilities.AccDb or AccDe". Within Utilities a have a progress meter form "ProgressMeterRainbow" and a class module "ClsMeterRainbow" which is used to open, close and update th e meter. How do I set a reference to ClsMeterRainbow from the main Clubs database I have trie Dim PMeterRainbow As New Utilities.ClsPMeterRainbow and Dim PMeterRainbow As New ClsPMeterRainbow. Both give a compile error of User-defined type not defined Thanks Phil Hi Phil, When you have a reference from Clubs to Utilities, then you can open the ProgressMeterRainbow form Clubs. As far as I know, that should not be a problem. Imb. Hi Imb In the Utilities DB, if I want to use the Progress meter, I need to set a reference in the form to the Class module . Dim PMeterRainbow As New ClsPMeterRainbow goes in the Declarations Then I can use PMeterRainbow.RainShowProgress Progress ' Opens the form ProgressMeterRainbow PMeterRainbow.RainSetCaption tCaption "" ' Default Progress Meter Caption PMeterRainbow.RainSetTitle SetTitle "Sending Emails ..." ' Progress Meter label Caption PMeterRainbow.RainSetLabToProcess "To send:" ' Progress Meter label Caption PMeterRainbow.RainSetLabProcessed "Sent:" ' Progress Meter label Caption PMeterRainbow.RainSetFromColour -1 ' Default from colour (Red) PMeterRainbow.RainSetToColour -1 ' Default to colour (Green) PMeterRainbow.RainSetToProcess PMFrmMax ' RecordCount PMeterRainbow.RainSetSmoothness Smoothness to set up the titles and how many records PMeterRainbow.RainIncOne (RecordNo) moves the bar along SendEMail_Click_Exit: PMeterRainbow.RainHideProgress ' Close the progress meter Set MyDb Nothing Exit Sub That seems a lot neater solution than opening the form directly, and althogh more complicated than the Call SysCmd(acSysCmdInitMeter ............) Call SysCmd(acSysCmdUpdateMeter, i) Call SysCmd(acSysCmdRemoveMeter) there is a lot more functionality Phil |
#5
| |||
| |||
|
|
On 06/05/2011 07:38:29, "Phil" wrote: On 05/05/2011 23:24:00, imb wrote: On May 6, 12:05*am, "Phil" <p... (AT) stantonfamily (DOT) co.uk> wrote: My main database is "Clubs.AccDb" I have a reference in the Clubs database to "Utilities.AccDb or AccDe". Within Utilities a have a progress meter form "ProgressMeterRainbow" and a class module "ClsMeterRainbow" which is used to open, close and update th e meter. How do I set a reference to ClsMeterRainbow from the main Clubs database I have trie Dim PMeterRainbow As New Utilities.ClsPMeterRainbow and Dim PMeterRainbow As New ClsPMeterRainbow. Both give a compile error of User-defined type not defined Thanks Phil Hi Phil, When you have a reference from Clubs to Utilities, then you can open the ProgressMeterRainbow form Clubs. As far as I know, that should not be a problem. Imb. Hi Imb In the Utilities DB, if I want to use the Progress meter, I need to set a reference in the form to the Class module . Dim PMeterRainbow As New ClsPMeterRainbow goes in the Declarations Then I can use PMeterRainbow.RainShowProgress Progress ' Opens the form ProgressMeterRainbow PMeterRainbow.RainSetCaption tCaption "" ' Default Progress Meter Caption PMeterRainbow.RainSetTitle SetTitle "Sending Emails ..." ' Progress Meter label Caption PMeterRainbow.RainSetLabToProcess "To send:" ' Progress Meter label Caption PMeterRainbow.RainSetLabProcessed "Sent:" ' Progress Meter label Caption PMeterRainbow.RainSetFromColour -1 ' Default from colour (Red) PMeterRainbow.RainSetToColour -1 ' Default to colour (Green) PMeterRainbow.RainSetToProcess PMFrmMax ' RecordCount PMeterRainbow.RainSetSmoothness Smoothness to set up the titles and how many records PMeterRainbow.RainIncOne (RecordNo) moves the bar along SendEMail_Click_Exit: PMeterRainbow.RainHideProgress ' Close the progress meter Set MyDb Nothing Exit Sub That seems a lot neater solution than opening the form directly, and althogh more complicated than the Call SysCmd(acSysCmdInitMeter ............) Call SysCmd(acSysCmdUpdateMeter, i) Call SysCmd(acSysCmdRemoveMeter) there is a lot more functionality Phil Partially solved it Exporting the ClsPMeterRainbow the header is VERSION 1.0 CLASS BEGIN MultiUse -1 'True END Attribute VB_Name "ClsPMeterRainbow" Attribute VB_GlobalNameSpace False Attribute VB_Creatable False Attribute VB_PredeclaredId False Attribute VB_Exposed False Option Compare Database Option Explicit Public FrmProgressMeterRainbow As Form_ProgressMeterRainbow |
![]() |
| Thread Tools | |
| Display Modes | |
| |