Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    42

    Unanswered: Declaring Control Constants

    Is is possible to create a constant and set it equal to a control for example a text box? I am having trouble with this.

    PUBLIC CONST tbcSol_Costing As Control = Me!TabCtlSol_CostMaint ' Return reference to tab control.

    I keep getting a compile error: Type Name

    Help!

    Thanks

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    You do the same thing by Publicly dimensioning your specific variable first (for example in a database module).

    Public MyCtrl As Control

    then Set a control to the variable (perhaps in the 'OnOpen' event of your startup form:

    Set MyCtrl = Me.MyTabControl

  3. #3
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: Declaring Control Constants

    Originally posted by waderw24
    Is is possible to create a constant and set it equal to a control for example a text box? I am having trouble with this.

    PUBLIC CONST tbcSol_Costing As Control = Me!TabCtlSol_CostMaint ' Return reference to tab control.

    I keep getting a compile error: Type Name

    Help!

    Thanks
    Someone will correct me if I'm wrong, but as far as I know this is not possible... Look up declaring constants in Access Help and you'll see...
    Constants can be declared as one of the following data types: Boolean, Byte, Integer, Long, Currency, Single, Double, Date, String, or Variant.
    Sorry... Wish I could figure out a way to help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •