472,328 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

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

Nov 13 '05 #1
1 1666
On Mon, 9 May 2005 22:43:08 +1000, "Jo K." <g4****@hotmail.com> wrote:

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

-Tom.
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_assessor) 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.


Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chasing Gates | last post by:
I have created a database that brings in a new table weekly. I then made a separate query for each sales rep and a separate report for each rep. ...
0
by: Chasing Gates | last post by:
I currently have the tables set up and a separate query for each individual sales rep. I then created 10 reports and a macro that sends out the...
6
by: MVSGuy | last post by:
I need to move a fairly complicated (100+ report/query calls) to a different database. How do I get an "object dependencies" from a macro? ...
1
by: grumpyone | last post by:
I'm looking for a method to enter and retain a start date and end date for use with a macro that runs 11 month-end reports that each require the same...
30
imrosie
by: imrosie | last post by:
Hello, I took over an application with forms, macros, reports....I've changed some of the controls on the forms,but left the names of forms in...
0
by: scolivas | last post by:
I don't know if this is the right place to ask or not...so here it goes... I have an excel spreadsheet with a macro that refreshes data which is...
3
MMcCarthy
by: MMcCarthy | last post by:
Although some users find Macros simple and easy to use, there are some major limitations to using them. Although you can use macros to perform...
2
by: JM420A | last post by:
I have 3 reports that I need to print sequentially, situation is this R- Report P-Person R1 has 3 pages, one for each P R2 " ...
1
by: awojciehowski | last post by:
Greetings: I have been working on a database and have found a peculiar error. When I open up my database and choose a form called "add...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.