Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In a macro, I set
    Action: SetProperty
    In Arguments, I set
    Control Name: Forms![frm成交].[Caption]
    Property: Enabled
    Value: "Dealing"
    I keep receiving the error shown in the screenshot.
    Please help.
    Thanks.
    Armstrong
    Attached Images Attached Images

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='armsys' post='779492' date='12-Jun-2009 20:32']In a macro, I set
    Action: SetProperty
    In Arguments, I set
    Control Name: Forms![frm成交].[Caption]
    Property: Enabled
    Value: "Dealing"
    I keep receiving the error shown in the screenshot.
    Please help.
    Thanks.
    Armstrong[/quote]
    What is the control name on the form? You should refer to the control name's caption like:

    Forms![frm成交]!Controlname.[Caption]

  3. #3
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='patt' post='779493' date='12-Jun-2009 16:58']What is the control name on the form? You should refer to the control name's caption like:

    Forms![frm成交]!Controlname.[Caption][/quote]

    Thanks for your help. How to find the Controlname? I suppose [frm成交] is the Controlname. [frm成交] is the name of the form which calls the macro.
    Armstrong
    Attached Images Attached Images

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='armsys' post='779495' date='12-Jun-2009 21:10']Thanks for your help. How to find the Controlname? I suppose [frm成交] is the Controlname. [frm成交] is the name of the form which calls the macro.
    Armstrong[/quote]
    So you want to change the forms caption?

    Again i ask why use macros, it's easier usingvba code and you have far more control over vba code than macros.

    By the way, why do you wish to change the form's caption?

  5. #5
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='patt' post='779498' date='12-Jun-2009 17:19']So you want to change the forms caption?

    Again i ask why use macros, it's easier usingvba code and you have far more control over vba code than macros.

    By the way, why do you wish to change the form's caption?[/quote]

    Hi Patt,
    Thanks for your interesting questions.
    >So you want to change the forms caption?
    Just for my study and test. My actual aim is to change the order of the display.

    >Again i ask why use macros, it's easier usingvba code and you have far more control over vba code than macros.
    Well, it's because I'm reading chapters on macros.

    Armstrong

  6. #6
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Hong Kong
    Posts
    359
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Patt,
    I just find the solution.
    The proper way to the caption:
    ---------------------------
    Control Name: [blank]
    Property: Caption
    Value: Dealing
    ---------------------------
    It works for me.
    Thanks for your help.
    Armstrong

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='armsys' post='779500' date='12-Jun-2009 20:41']Hi Patt,
    I just find the solution.
    The proper way to the caption:
    ---------------------------
    Control Name: [blank]
    Property: Caption
    Value: Dealing
    ---------------------------
    It works for me.
    Thanks for your help.
    Armstrong[/quote]
    Glad you found it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •