I have a form which has one to many kind of display actually it is Appointments page for an employee and an emploee may have a number of appointments in the past which all are listed here in the form.
When I try to print this form thru a Macro ( PrintOut) it prints an many times as the number of appointments.
So how to make it print it just once. i mean actually it should do Kind of PrintScreen type.
Any Help will be appreciated,
Thanks,
Archana
4 20992
I have a form which has one to many kind of display actually it is Appointments page for an employee and an emploee may have a number of appointments in the past which all are listed here in the form.
When I try to print this form thru a Macro ( PrintOut) it prints an many times as the number of appointments.
So how to make it print it just once. i mean actually it should do Kind of PrintScreen type.
Any Help will be appreciated,
Thanks,
Archana
PrintOut can be a little quirky, so here is a little trick, that will always Print 'only' the Current Record on a Form: - Filter on the Primary Key Field on your Form.
- Set FilterOn = True.
- Print the single Form Record.
- Remove the Filter (FilterOn = False).
- You can even return to the Record that you Printed if you so desired.
- Me.Filter = "[Product ID]=" & Me![txtProductID]
-
Me.FilterOn = True
-
-
DoCmd.SelectObject acForm, Screen.ActiveForm.Name, False
-
DoCmd.PrintOut
-
-
Me.FilterOn = False
Thanks for your reply,
but there are 2 tables employee & appointments for every employee there can be many appointments ( say "n") . So when i print the appointments screen it prints it correctly but prints it a number of times ( "n" times).
This is because setting is to print current selection and all those appointment records are selected at this point of time.
Is there a way to not print current selection of records but to just "print the screen".
Thats whay i think P. Key funda wont apply here as all those appointment belong to that particular employee.
Thanks,
Archana
Thanks for your reply,
but there are 2 tables employee & appointments for every employee there can be many appointments ( say "n") . So when i print the appointments screen it prints it correctly but prints it a number of times ( "n" times).
This is because setting is to print current selection and all those appointment records are selected at this point of time.
Is there a way to not print current selection of records but to just "print the screen".
Thats whay i think P. Key funda wont apply here as all those appointment belong to that particular employee.
Thanks,
Archana
The following code will copy the Active Screen to the Clipboard. You can then Paste it into any Application that will support this type of operation. Don't think this really helps - but it is an idea. - SendKeys "%({PRTSC})", True
Thanks for your reply,
but there are 2 tables employee & appointments for every employee there can be many appointments ( say "n") .
......
Thats whay i think P. Key funda wont apply here as all those appointment belong to that particular employee.
Thanks,
Archana
I think you could add the second part of the key (Appointment) to the filter. If you use the code ADezii suggested it would become: -
Me.Filter = "[PersonID]=" & Me![txtProductID] & "[AppointmentID]=" & Me![txtApptID]
-
Me.FilterOn = True
-
DoCmd.SelectObject acForm, Screen.ActiveForm.Name, False
-
DoCmd.PrintOut
-
Me.FilterOn = False
or you could use filter by form to narrow the records returned to just the one before you print.
James
Sign in to post your reply or Sign up for a free account.
Similar topics
by: YERVANT |
last post by:
I would like use the Print Screen Button to copy a part of
page using ASP.
En fact, I use a data access page of a chart (pivot)
created by access.
And I would like copy only the chart.
I think...
|
by: Vicente Nicolau |
last post by:
Hello,
I'm programming an application and I need to disable the print screen key.
How can I do it?
Can I use the UIPermissions to disable the print screen key?
Thanks
|
by: Tim Marsden |
last post by:
Is there a way of turning off or preventing the print screen function while
my application is running. (VB.NET).
Thanks
Tim
|
by: Zlatko Matić |
last post by:
Hello.
I tried to print the current situation on the form/subform/subform...but it
seems that Access prints all the records on all the subforms.
I would like to print just the image (something...
|
by: melanieab |
last post by:
Hi,
I have a tabpage with a print button. This button tries to do a print
screen, and it works fine the first time, but if I try to press print again,
I get error:
An unhandled exception of type...
|
by: chicken butt |
last post by:
I have a back office app developed using the 1.1 framework with VB.NET.
When we print using the browser, the end result is garbled pretty good.
I am wondering if it is possible to create a...
|
by: zalph |
last post by:
1- Is it possible to disable the keyboard print screen...
2- ... in javascript? If so, how?
|
by: toronto |
last post by:
Seasons Greetings Everyone!
I want to use JavaScript's event object to detect whether someone has
pressed the 'PrintScreen' key to screenshot, via the Windows Clipboard,
and to print website...
|
by: =?Utf-8?B?THVpZ2k=?= |
last post by:
Hi all,
anyone knows if is it possible to insert (and obviously save) a Windows
print screen in a GridView cell? (ASP.NET 2.0).
Thanks in advance.
--
Luigi
|
by: Joe Duchtel |
last post by:
Hello -
I would like to create an application that starts up upon login (e.g.
Startup folder) and then waits for the Alt+Print Screen button to be
pushed. I still want this button to put a...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |