• Automatic Comment on Macro (2003 SP1)

    Author
    Topic
    #434409

    Here’s the deal. I have a form that allows a user to search for a specific owners information. Once there, the user can view all of the owners specific information and can click a form button to pull up a canned letter with the owners address information to mail out. I have an additional table where users can add comments for that specific owner. What i’d like to accomplish is to automatically add a record to the comments table that adds a generic comment like “auto generated letter”. The button that pulls up the letter now is a macro (OpenReport) which passes the owner number to include their specific information.

    Viewing 0 reply threads
    Author
    Replies
    • #1024060

      – Create a new query.
      – Don’t add any tables to it.
      – Create two columns in the query:

      C1: [Forms]![frmSomething]![OwnerID]

      C2: “Auto Generated Letter”

      – Replace frmSomething with the name of the form in which the user has selected an owner, and OwnerID with the name of the field that uniquely identifies the owner.
      – Select Query | Append Query…
      – Specify the comments table as target.
      – Select the appropriate fields in the ‘Append to’ line for C1 and C2.
      – Save this query as (for example) qryAddComment.

      – Open your macro in design view.
      – Add an OpenQuery action.
      – Specify the name of the append query (qryAddComment) in the Query name argument.

    Viewing 0 reply threads
    Reply To: Automatic Comment on Macro (2003 SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: