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 / Reports / Printing / December 2005

Tip: Looking for answers? Try searching our database.

YES/NO FIELD IN SUBFORM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ClaudioMadeinItaly - 28 Nov 2005 11:17 GMT
I have a subform showing records with a Yes/No field. If the field is checked
a macro will append the record to another table.
My problem is that I would like the subform to immediately update after
checking the field but it does it only if I go to another record. If I exit
the subform and press the command button the field is not updated. A macro
linked to AfterInsert or onEnter etc... would give an error stating the
subform is not open.

Is there a way to do it?

Thanks beforehand
Allen Browne - 28 Nov 2005 12:36 GMT
Not sure why you are appending the record to another table, but I will wager
that this append should not occur if the record does not get saved, e.g. if
the user undoes it or it fails a validation rule.

The AfterInsert event of the subform itself is the first notification you
receive that a new record has been created, so it makes sense to use that
event. However, you will also need to use the AfterUpdate event of the form
(not control) to make any adjustment if the record was edited, or the
AfterDelConfirm event to make any adjustment if the subform record was
deleted.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have a subform showing records with a Yes/No field. If the field is
>checked
[quoted text clipped - 9 lines]
>
> Thanks beforehand
ClaudioMadeinItaly - 28 Nov 2005 22:06 GMT
Thanks for your help, but I have solved the problem in the meanwhile.

> Not sure why you are appending the record to another table, but I will wager
> that this append should not occur if the record does not get saved, e.g. if
[quoted text clipped - 20 lines]
> >
> > Thanks beforehand
Larry Linson - 04 Dec 2005 06:05 GMT
> Thanks for your help, but I have solved the problem in the meanwhile.

Would you share your solution so others could benefit from it, too?

 Larry Linson
 Microsoft Access MVP
 
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.