Continues Form records selection

  • Thread starter Thread starter Gsurfdude
  • Start date Start date
G

Gsurfdude

In a continues form, how do I "hide" a row. Example, in the form there's 4
records and #3 is clicked, I do not want to delete that record but hide it
from view.

Thanks.
 
Create a table called, say, HiddenRecs, with a single field that is the same
type as the ID of the records you want to hide. Set the data source of your
form to:
SELECT Field1, Field2, etc. FROM YourTable WHERE ID NOT IN
(SELECT ID FROM HiddenRecs).
In your Form_Load event, delete all the records from this table.
When a record is clicked, the click event should insert the ID of the
current record into HiddenRecs, then requery the form.
 
One caveat - If the database is split, with multiple users accessing a
back-end MDB on a server via linked tables, the HiddenRecs table must be on
the user's front end MDB. In this scenario, it is IMPERATIVE that each user
have a local copy of the front end.
 
Thanks, but itis a Oracle table linked to Access. There's got to be an easier
way to click the row and do something like

Hide me.CurrentRecord - I know there's not but in psuedo code that's what I
mean.

Second, this continues form is a sub form which get's it's record from a
from the main form which has several combo boxes on it to use in the "WHERE"
clause which is dynamically built
 
Should still work with a linked table, as long as the HiddenRecs table is in
the local MDB. The data source for the subform can be dynamically built, as
long as the WHERE clause includes the phrase
AND ID NOT IN (Select ID FROM HiddenRecs).
A query can reference different tables in its main select and subselect
caluses.

The reason that there is no "HideMe" method has to do with relational
calculus. A query defines a set of records, and to hide any of them, you have
to redefine the set. That' s what my proposed method does.
 
Back
Top