Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Thanked 0 Times in 0 Posts

    Automatic Comment on Macro (2003 SP1)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Automatic Comment on Macro (2003 SP1)

    - 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.

Posting Permissions

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