var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Filter on current record in a form using a check box
I have a database that has a checkbox to indicate that the record is complete and no longer active.
When I click the check box I would like it to filter on the ID number to limit to that record and then output this to an email that will be sent to selected members that the actions are complete.
In the afterupdate property I have tried a where statement in a macro but I must be doing it wrong as I still outputs all the records.
I hope I have expainted it ok, any help would be appreciated
Post the code you've been toying with please
P.S. you can (read should) convert your macros into VBA code by right clicking them and chosing Save As... Module
This is the code thats in the after update,
I don't know why but it brings up a find box
Private Sub Action_Complete_Click()
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
DoCmd.SendObject acForm, "REA", "MicrosoftExcelBiff8(*.xls)", "", "", "", "REA Update", "The attached REA has been completed and is now closed. Any queries please raise with relevent department.", True, ""
So, here's where we resort to good old fashioned debugging...
Comment out each line in turn and run the code; this should allow you to tell us which of the 3 lines are causing the problem and we can proceed from there
Hi, thanks for all your help, I managed to get it fixed. My code now reads the following code and works a treat.
On Error GoTo Ger_REA_Number_for_report_Err
DoCmd.OpenReport "REA Report", acViewPreview, "", "[REA Number]=[Forms]![REA]![REA Number]", acHidden
DoCmd.SendObject acReport, "REA Report", "RichTextFormat(*.rtf)", "", "", "", "REA Completion", "The attached REA has been completed, please review. Any issues please contact relevent department", False, ""