Macro Reports

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jo K.

    #1

    Macro Reports

    I have the following fields in a table.
    -JobNo (primary key)
    -Assessor (combo box containing only two names to choose from ie. John,
    Bill)
    I have created two seperate reports which have exactly the same content
    except that they have a different electronic signatures respective of the
    person chosen from the Assessor combo box.
    ie. Rpt_John and Rpt_Bill
    To produce these reports, I currently have two macro's (one for each of the
    two assessors) in a form (frm_main) whereupon clicking a particular macro
    button (ie button named BILL), popup dialogue box (running a query....
    qry_rpt_assesso r) asks for the JobNo. Upon entering the number, the report
    is produced based on the info that the particular jobno contains respective
    to the assessor.
    My question is: How can I create a macro or code that when the user is in a
    particular record (jobno) that a report will be produced based on info that
    is already there ie jobno and the assessor foregoing the prompt. So with
    one click of the macro button, the report will be produced without any input
    from the user ie. the report being able to gather the information from the
    current jobno that the user is in and the assessor's name that has populated
    the Assessor field box.
    thanks for any help.



  • Tom van Stiphout

    #2
    Re: Macro Reports

    On Mon, 9 May 2005 22:43:08 +1000, "Jo K." <g45340@hotmail .com> wrote:

    Check out DoCmd.OpenRepor t in the help file. It has an argument called
    WhereClause. Use it to enter something like:
    "JobNo=" & Forms!MyForm!My JobNoControl

    -Tom.
    [color=blue]
    >I have the following fields in a table.
    >-JobNo (primary key)
    >-Assessor (combo box containing only two names to choose from ie. John,
    >Bill)
    >I have created two seperate reports which have exactly the same content
    >except that they have a different electronic signatures respective of the
    >person chosen from the Assessor combo box.
    >ie. Rpt_John and Rpt_Bill
    >To produce these reports, I currently have two macro's (one for each of the
    >two assessors) in a form (frm_main) whereupon clicking a particular macro
    >button (ie button named BILL), popup dialogue box (running a query....
    >qry_rpt_assess or) asks for the JobNo. Upon entering the number, the report
    >is produced based on the info that the particular jobno contains respective
    >to the assessor.
    >My question is: How can I create a macro or code that when the user is in a
    >particular record (jobno) that a report will be produced based on info that
    >is already there ie jobno and the assessor foregoing the prompt. So with
    >one click of the macro button, the report will be produced without any input
    >from the user ie. the report being able to gather the information from the
    >current jobno that the user is in and the assessor's name that has populated
    >the Assessor field box.
    >thanks for any help.
    >
    >[/color]

    Comment

    Working...