OPENFORM

D

Denise

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
 
K

Ken Snell \(MVP\)

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 & "'"
 

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