Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I use a CheckBox?

Status
Not open for further replies.

aromech

Mechanical
May 29, 2003
24
Well, I think I'm thoroughly confused. Here's another explanation that I came up with:

The application has a CheckBox labeled "Checked?" that coincides with a custom file property that I'll label "Checked". If the user checks the box, it will write a Yes value (hopefully some type of True False value?) to the property. If the user leaves the box unchecked, the application will write a No value to the property when they click OK.

However, when the application is accessed, the CheckBox should default to unchecked whether the property is Yes or No and the user needs to recheck the Checkbox and click OK if he/she wants to keep the Yes value.

Does that make sense? I'm struggling with the property Types and all that retrieval stuff seen in my code above. As I think through this, do I not even need to worry about retrieval based on my explanation? Thanks!
__________________
Jeremy (VB 6.0)
Every man dies, but not every man lives. - William Wallace
 
Replies continue below

Recommended for you

Can you be more specific, which application and which checkbox. I'm lost too.

Chris
Sr. Mechanical Designer, CAD
SolidWorks 05 SP3.1 / PDMWorks 05
ctopher's home site

FAQ559-1100
FAQ559-716
 
I'm writing VB 6.0 application for SW2005. Here's some more explanation, sorry for the lack of info.
I sat down with pencil and paper and went over this again but I keep coming up with what I think is a circular reference. Here's what I'm trying to do and then my code so far.

One thing I don't understand is how to use the "Yes or No" custom property in a file. All I've been using is "Text". I want all my files to be defaulted to a "Yes" value. When the user runs the application, the CheckBox should become unchecked, as it's been defaulted to checked/yes, and when they click Ok, the custom property value will change to "No."

In this program there's some of this which I don't totally understand
Code:
blnRetval = ModelDoc.DeleteCustomInfo2("", "Designer")
blnRetval = ModelDoc.AddCustomInfo3("", "NOTE", swCustomInfoText, .cbo_note.Text)
strNote = ModelDoc.CustomInfo2("", "NOTE")and maybe I'll have to incorporate this reloading? The following code somewhat explains what I'm trying to do, but what else do I need to do related to the above code and circular referencing?

Code:
Sub CheckedBox_Yes_No()
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'This sub routine works the checked box to tell user if the
'part has been checked by a checker.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Set reference to form
With frmFabricatedPartsProperties

'If Checked box is checked then write Yes
'to the description
If Checkedprop = "Yes" Then
.CheckedBox.Value = vbUnchecked
End If

If .CheckedBox.Value = vbChecked Then
strCheckedbox = "Yes"
Else

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor