Hiding records in form view

M

Moonman

Is there anyway to program a command button to hide the
current record in the "form view," but still be visible on
the "Datasheet view." Once the record is hidden, I want it
to stay that way. Once hidden, always hidden.

Thanx,
Moonman
 
K

Ken Snell

I suppose that you could add a field to your table that would be a flag for
whether to display the record in form view or not, and use the command
button to set that flag or to unset that flag. Then you could write VBA code
that would test the form's view property in the OnLoad or OnOpen event to
see what the view is, and then change the form's recordsource from one query
to another (where the query for the form view doesn't select records where
this flag field is set to False, and the other query (for the datasheet
view) selects all records).

I admit I am not sure why you want to do this, but this is one idea.
 

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