Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146

    Unanswered: Accomplish task without macro

    Is there a way to accomplish this without a macro?

    I have a command button that I use to clear the contents of a text box. I have the OnClick property set to "Macro1" and in that macro I'm using the following:

    Action: SetValue
    Item: [Forms]![Customers]![Text29]
    Expression: Null

    I'd like to be able to do this with just the code and without a macro. Any ideas?

  2. #2
    Join Date
    Feb 2004
    Location
    Canada
    Posts
    133
    In the OnClick property, rather than choosing Macro1, choose Event Procedure, then click the button to the right with the three dots.
    In the window that opens, put
    Me.Text29 = Null
    inside the sub procedure.
    I think that should do it.

    I'm assuming that your button is on the same form as Text29, which is why I used "Me" instead of Forms!Customers.

  3. #3
    Join Date
    Sep 2004
    Location
    Raleigh, NC
    Posts
    146
    That was very simple, but yet I didn't think to try it. Thank you.

Posting Permissions

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