Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using DoCmd to set a value

    Access help files says that you can set value for a control by using DoCmd function, however it doesn't tell me how? There is no SetValue object for VBA.

    Thanks in advance!

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Using DoCmd to set a value

    Hi Brent,
    I think the help files are a little misleading on this! They say that you use docmd to run actions in VBA, and that actions are such things as closing windows, opening forms and setting the value of controls. However, it goes on to say that there is no DoCmd method corresponding to setvalue. This shouldn't really affect you as you can simply set the value of a control directly - for example, Me!txtTextBox1 = "Hello"
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Seattle, Washington, USA
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using DoCmd to set a value

    It worked perfectly! I really appreciate 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
  •