Hiding records in form view

  • Thread starter Thread starter Moonman
  • Start date Start date
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
 
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.
 
Back
Top