Close record

F

femfrog

Hi,

I have a sub-form which allows a user to input any outstanding items. The
user clicks on a checkbox to indicate that the outstanding item is completed.

The sub-form is based on an "outstanding items" form. The form is continuous.

I would like a record to dissapear once the "completed" check box is
clicked. I'm assuming I will need to add a code into the checkboxes on-click
event. I just don't know what the code is.

Please help...
 
J

Jeff Boyce

How does the subform "know" what records to show now? I'll assume you have
a query that selects based on whether the checkbox field is unchecked (so
that it would only show the "outstanding" items).

If you requery the subform after each change to the checkbox control (I'd
probably use AfterUpdate), the list of "outstanding" items will only contain
those that have not yet been checked.

Try something like this -- in the AfterUpdate event of the checkbox, use:
Me.Requery

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 
F

freakazeud

Hi,
it seems to me as if your subform is based on a table.
I would suggest you create a query on this same table...then within the
query grid add FALSE to the Yes/No boolean field criteria. Now this query
should only return all records which do NOT have a True value in the table
field.
Bind your subform to this query instead...now on some event you can just
requery the subform itself and it should just reflect the correct records.
HTH
Good luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top