?
Solved

Triple State check box needed

Posted on 2003-03-13
3
Medium Priority
?
237 Views
Last Modified: 2013-12-26
I am trying to find a 3 state checkbox and can't seem to find an ocx or any kind of instructions to make one. The Check box needs to have values 0 - unchecked, 1 - pending check, 2 - checked.

The values 0,1, and 2 are needed but the descriptions were supplied by me and can be anything. Any help would be great.

Thanks in Advance.
0
Comment
Question by:pang0018
3 Comments
 

Expert Comment

by:DaCableGy
ID: 8134432
i don't know of any 3-states that are available controls, but it is easy to make one
use a image and a label and then when the user clicks on either change the image between img0, img1, img2 and repeat
i will look the same if you want to make the img look the same and you can also make some really graphical ones too.
so it will look like
image   label
XXXXX   XXXXXXXXXXXXXXX
X   X   XXXXXXXXXXXXXXX
XXXXX   XXXXXXXXXXXXXXX

and then use something like
sub image_Click
  if image.tag <> 1 and image.tag <> 2 then
    image.tag = 1
    image.picture = img1.src
  end if
  if image.tag = 1 then
    image.tag = 2
    image.picture = img2.src
  end if
  if image.tag = 2 then
    image.tag = 0
    image.picture = img0.src
  end if
end sub

that will create a nice loop so the user can cycle through
hope that starts you in the right direction
---DaCableGy---
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 300 total points
ID: 8135152
The standard VB Checkbox is already tristate:

0 - Unchecked
1 - Checked
2 - Grayed (Checked with gray background).
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9053269
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept TimCottee's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

616 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