Macro to open form to a particular record (1 Viewer)

Angello Pimental

Registered User.
Local time
Today, 06:19
Joined
May 9, 2001
Messages
92
I need a Macro that opens a form to a particular record on a onclick event.
I can get the Macro to open the particular form I want, but when I use the Where Condition to determine what record to open, the form that I am opening freezes and is just a grey box.

The Where condition code I am using is:

[Forms]![RealForm]![domainlist]=[Forms]![Search]![value]

Can anyone help me with this???
Thnx for any help.
Angelo
 

D-Fresh

Registered User.
Local time
Today, 06:19
Joined
Jun 6, 2000
Messages
225
Why don't you just use code instead? In the onClick event of the button, select [Event Procedure] then put the following code in the module...

DoCmd.OpenForm "RealForm", acNormal, , "[domainlist]='" & Me("value") & "'"
if it is a string value

or

DoCmd.OpenForm "RealForm", acNormal, , "[domainlist]=" & Me("value")
if it is a numeric value.

Hope that helps.

Doug
 

Angello Pimental

Registered User.
Local time
Today, 06:19
Joined
May 9, 2001
Messages
92
Thnx for help D-Fresh, I have now gotten it to work.
 

Users who are viewing this thread

Top Bottom