Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

checkboxes unchecking in VB code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amateur - 15 May 2007 17:57 GMT
Dear Sirs

I have a VB code which is executing appen-,deletequeries and is printing a
report.
To run this code I have to check upfront a checkbox – either yearlypayment
or halfyearpayment. After the code ran the checkbox is still checked. I would
like the checkbox automatically unchecking, after the VB code ran. Is this
possible with another line in the VB code and if yes, how?
This is my code:

Private Sub cmdPrintbill_Click()
Dim stDocName As String

CurrentDB.Execute "billyearlyhelpappendquery", dbFailOnError
CurrentDB.Execute "billhalfyearhelpappendquery", dbFailOnError
CurrentDB.Execute "billsappendquery", dbFailOnError
CurrentDB.Execute "openbillsappendquery", dbFailOnError
DoCmd.OpenReport "billingcemetery", acViewNormal
CurrentDB.Execute "billingtabledeletequeryquery", dbFailOnError

End Sub

Thanks
Klaus
Maurice - 15 May 2007 18:19 GMT
Well you could end your code with(before the end sub): me.checkbox=false
Where checkbox is the name of your checkbox.

Maurice

> Dear Sirs
>
[quoted text clipped - 20 lines]
> Thanks
> Klaus
Amateur - 15 May 2007 19:31 GMT
The checkboxes are on a subform how can I write the code correct.
Somehow I have to show where the textbox is 8something like):
me.[billinghalfyear].halfyearpayment = False
but that's not working.
Can you tell me how it is correct?
Thanks
Klaus

> Well you could end your code with(before the end sub): me.checkbox=false
> Where checkbox is the name of your checkbox.
[quoted text clipped - 25 lines]
> > Thanks
> > Klaus
Jackie L - 15 May 2007 19:49 GMT
Is your code running from the subform or the main form?
You may need the code to read

Forms!frmMainForm!sfrmSubform.forms!CheckBox = False

Hope this helps.

> The checkboxes are on a subform how can I write the code correct.
> Somehow I have to show where the textbox is 8something like):
[quoted text clipped - 33 lines]
> > > Thanks
> > > Klaus
Amateur - 15 May 2007 20:11 GMT
the checkboxes are on a subform and should be cleared there - but I don't
understand what you are saying.
Maybe you can specify with the details I am giving now.
My subform is called "billinghalfyear" the checkbox is called
"halfyearpayment" - How does it has to look?

Forms!frmofferandbill!sfrmbillinghalfyear.forms!halfyearpayment = False

like this it's not working, can you help?
Thanks
Klaus

> Is your code running from the subform or the main form?
> You may need the code to read
[quoted text clipped - 40 lines]
> > > > Thanks
> > > > Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.