GoldBishop
GoldBishop

Reputation: 2861

Handle Filter and OpenArgs

Continuation of some possibilities for my existing project.

I am looking into handling the probability that someone, after me, would pass OpenArgs or Where values, via OpenForm, and I was wondering if there was a way to "catch and release" the values as invalid.

I figured in OpenArgs i would handle it through Open, unless i misread the information on MSDN (which is possible considering the abstract obfuscation of the information).

  1. My question is more of how do I catch someone passing the Where value to a form?
  2. Is there a One-Stop Shop where i can catch both of them or will i have to handle two Events?

Looking to try and kill both "birds" with one "stone", if possible. I plan on abstracting both events to a standard method located in a Module, but need to start somewhere first.

Upvotes: 1

Views: 432

Answers (1)

Fionnuala
Fionnuala

Reputation: 91376

Where will limit the recordset by a filter. You can check the filter property for the form. Openargs is separate.

Private Sub Form_Open(Cancel As Integer)
Debug.Print "Open filter " & Me.Filter & " is on " & Me.FilterOn
End Sub

Upvotes: 2

Related Questions