Macro question (1 Viewer)

rikklaney1

Registered User.
Local time
Today, 00:41
Joined
Nov 20, 2014
Messages
157
Hi guys, I have another (probably) stupid question. I have a form with an unbound text box (text6). I want to open this form from a macro and set the value of text6 depending on which macro opened the form.

macro1 text6.value = "rs1"
macro 2 text6.value = "rs2"
etc.
etc.


Is there a way to do this with a standard macro? I have tried using the Where condition in the macro builder but either that's not the way to go or I have the syntax wrong. Here's what I put

Where Condition = [Forms]![process]![Text6]="rs1"


the form still open with text6 blank. Any suggestions?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:41
Joined
Aug 30, 2003
Messages
36,125
Well, the where condition opens the form to a desired record. It sounds like you want an action after the OpenForm action, either SetValue or SetProperty.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 15:41
Joined
May 7, 2009
Messages
19,241
Code:
OpenForm
    FormName    yourFormName
    View        Form
    Filter Name
    Where Condition
    Data Mode
    Window Mode    Normal

SelectObject
    Object Type    Form
    Object Name    yourFormName
    In Database Window    No

SetProperty
    Control Name    text6
    Property    Value
    Value        rs1
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:41
Joined
Aug 30, 2003
Messages
36,125
I'll get out of the way.
 

Users who are viewing this thread

Top Bottom