Solved

User Defined Data Type, Like Boolean but with three options

Posted on 2011-03-20
3
377 Views
Last Modified: 2012-05-11
Here are some easy points for someone, I'm sure.

I want to decalre a new datatype to operate like Boolean does, but I need three options instead of two.

Public Type LogOpt
    'The three options are:
       1. OpenNow (integer value 1)
       2. CloseNow (integer value 2)
       3. OpenCloseNow (integer value 3)
End Type

What is code to Declare this user defined data type?

Cheers.
0
Comment
Question by:Carl Sudholz
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 125 total points
ID: 35177072
Enum Statement
Declares a type for an enumeration.

Syntax
[Public | Private] Enum name
membername [= constantexpression]
membername [= constantexpression]
. . .
End Enum
0
 

Author Closing Comment

by:Carl Sudholz
ID: 35177104
Provided the Syntax of for Enumeration which made me think a bit.  But probably a better solution becuase I learned more.
0
 

Author Comment

by:Carl Sudholz
ID: 35177107
Thats what I was looking for.

Thanks
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question