|
-
Mar 1st, 2006, 04:39 PM
#1
Thread Starter
Addicted Member
[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?
-
Mar 1st, 2006, 11:09 PM
#2
-
Mar 2nd, 2006, 02:46 AM
#3
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 2nd, 2006, 02:54 AM
#4
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Mar 2nd, 2006, 08:56 AM
#5
Thread Starter
Addicted Member
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.
-
Mar 2nd, 2006, 10:50 AM
#6
Thread Starter
Addicted Member
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.
-
Mar 2nd, 2006, 11:50 AM
#7
Addicted Member
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
-
Mar 2nd, 2006, 12:40 PM
#8
Thread Starter
Addicted Member
Re: MS ACCESS, VB6 Check boxes one or the other
You all are awsome Thanks!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|