Results 1 to 5 of 5
  1. #1
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694

    convert property TYPE to ENUM

    would anyone know how to convert the TYPE property of an actual FORM'S property to it's literal ENUM string value?

    example:
    Code:
    with forms("form1")
    
       debug.print .properties("modal").type
    
    end with
    that code will print the value "11" in the immediate window because the ENUM constant name is "dbBoolean".



    What I'm looking for is a way to convert the return value of "11" to the actual constant NAME ("dbBoolean"). Anyone got any experience? Thanks!

  2. #2
    DaveT is offline Access Developer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Location
    Texas
    Posts
    69
    Best I can tell, you just have to write a SELECT CASE routine, pass it the number and have it return the equivalent string.

    BTW, I get dbBoolean as = 1

    You might look at Access help for DataTypeEnum Enumeration.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    yes dave,

    thanks for the suggestion. I found out that I can do just that with the VarType() function. forgot that was available. thanks!

  4. #4
    DaveT is offline Access Developer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Location
    Texas
    Posts
    69
    Yes, I forgot about vartype (duh). And vbBoolean is 11.

    If Microsoft keeps pushing macros and "intellisense" before long none of us will know how to program VBA ...

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by DaveT View Post
    Yes, I forgot about vartype (duh). And vbBoolean is 11.

    If Microsoft keeps pushing macros and "intellisense" before long none of us will know how to program VBA ...
    Yeah right...no kidding. Unfortunately I think that's another attempt from the "powers that be" to keep the knowledge out of the hands of the less fortunate. maybe not thought. I think we're going to see a big change if MS keeps doing this though. We can't stop using their products due to their power, but there are other things that we can do.

    It'll be interesting to see what happens from the people.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. the property is read only and cannot be set
    By darksniperx in forum Access
    Replies: 16
    Last Post: 11-02-2012, 02:48 PM
  2. Replies: 2
    Last Post: 03-18-2010, 08:24 PM
  3. Can Grow Property
    By chum in forum Reports
    Replies: 3
    Last Post: 01-25-2010, 11:10 AM
  4. Can Grow Property
    By MFeightner in forum Reports
    Replies: 0
    Last Post: 06-24-2009, 11:50 AM
  5. 'On Open' Property
    By emilylu3 in forum Forms
    Replies: 1
    Last Post: 12-08-2005, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums