[RESOLVED] MS ACCESS, VB6 Check boxes one or the other
I am trying to have this form on my Database to be one or the other have to be selected. IE open or closed. I want the open to automaticly be selected. (I have that set through ACCESS) but I want it if I click closed then the check goes out of open and is now on closed. Can anyone help?
Re: MS ACCESS, VB6 Check boxes one or the other
Hi!!!
Are your checkbox designed in MS Access forms or VB 6.0 form? What are you trying to emphasize? What's the purpose of the checkboxes?
:) :) :)
Re: MS ACCESS, VB6 Check boxes one or the other
So your saying to change the caption of the checkbox from open to close upon the check or uncheck?
Re: MS ACCESS, VB6 Check boxes one or the other
Add a checkbox and delete the inner text control so its just a checkbox. Then add a label in its place and associate it with the checkbox control. Then code like this will do it.
VB Code:
Private Sub Check12_Click()
If Label14.Caption = "Open" Then
Label14.Caption = "Close"
Else
Label14.Caption = "Open"
End If
End Sub
Re: MS ACCESS, VB6 Check boxes one or the other
Thank you for your responce. I have 2 checkboxes that are designed in Access. What I am trying to do is when I click the closed check box the check that is in open goes away.
Here is the situation. This is a Maintenance Ticket Program. When I create a ticket it automaticly selects the open checkbox. When this is open I can run a report and see all open tickets. When a ticket gets completed I want to be able to select closed it unchecks open so when I run the report again it will not show as open.
Re: MS ACCESS, VB6 Check boxes one or the other
I will be happy to post the .mbd file if anyone needs to to understand what I am trying to do.
Re: MS ACCESS, VB6 Check boxes one or the other
This should do it
VB Code:
Private Sub chkClose_Click()
dim v as integer
if chkClose.value=-1 then
v=0
else
v=-1
end if
chkOpen.value=v
End Sub
Re: MS ACCESS, VB6 Check boxes one or the other
You all are awsome Thanks!!!