OPENFORM

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running a macro using "OPENFORM" I would like to use a "filter" or a
"where condition" to find a specific record. I don't how to create either or
where to find help with coding. Please help
 
An OpenForm action in a macro has an argument named "Where Condition". You
use this to apply a filter to the form when it opens.

The syntax of the expression that you use is this:
[FieldNameInFormRecordset] = "SomeValue"

You can use the value of a control on another form (assumes that the Field
is a numeric field):
[FieldNameInFormRecordset] = Forms!NameOfFirstForm!NameOfControl

or it it's a text field:
[FieldNameInFormRecordset] = "'" &
Forms!NameOfFirstForm!NameOfControl & "'"
 
Back
Top