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 / Forms / July 2007

Tip: Looking for answers? Try searching our database.

Delete all records on close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gee... - 01 Jul 2007 22:10 GMT
I have a continuous form with bound check box to choose parts to be added to
a report.  
I need to have all the check boxes to become False when the form is closed.  
When I ask for that, it only works for the current form, not all the others.
Is there a way to delete all records on close?
I've tried Add=False (it only works on the current record, not the others)
I've tried making the Default value False (didn't work at all)

Thank you in advance for any help.
Gee
Ofer Cohen - 01 Jul 2007 23:14 GMT
If you want to update all the records in the table to False, create update
query

UPDATE TableName SET TableName.YesNoFieldName = False
*********
And then run this code from the UnLoad event of the form

CurrentDb.Execute("QueryName"), dbFailOnError
*********
Or, without creating  query you can run this SQL
CurrentDb.Execute("UPDATE TableName SET TableName.YesNoFieldName = False"),
dbFailOnError
*********

Note: Just to make that what you want, this SQL will update all the records
in the table regardless to what you have in the form
Signature

Good Luck
BS"D

> I have a continuous form with bound check box to choose parts to be added to
> a report.  
[quoted text clipped - 6 lines]
> Thank you in advance for any help.
> Gee
Gee... - 02 Jul 2007 00:06 GMT
> If you want to update all the records in the table to False, create update
> query
[quoted text clipped - 23 lines]
> > Thank you in advance for any help.
> > Gee
Gee... - 02 Jul 2007 17:02 GMT
PERFECT!
I ran the SQL and it did exactly what I needed done!
Thank you so much!

> > If you want to update all the records in the table to False, create update
> > query
[quoted text clipped - 23 lines]
> > > Thank you in advance for any help.
> > > Gee
 
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



©2009 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.