473,671 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print preview resets the form

Hi, suppose I want to print third record from a subform.
The problem is, that when I want to print what I see on my monitor
(third record), the print preview resets
the form to the first record (wants to print the whole form beginning).
Is the any possibility to print a particular record, without making
screenshots?
Please, help me!!!

Jan 22 '07 #1
1 1907
hosi wrote:
>Hi, suppose I want to print third record from a subform.
The problem is, that when I want to print what I see on my monitor
(third record), the print preview resets
the form to the first record (wants to print the whole form beginning).
Is the any possibility to print a particular record, without making
screenshots?

That's what printing a form does. You should use a report
to display a record's data.

Create the report based on a query that retrieves the
desired fields for all possible records. Then add a button
to your form to print the current record by using the
OpenReport method's WhereCondition argument. The general
idea is something like:

Dim stWhere As String
stWhere = "[the pk field] = " & Me.[the pk field]
DoCmd.OpemRepor t "name of report", , , stWhere

--
Marsh
Jan 22 '07 #2

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

Similar topics

7
14359
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to display the graph but it is not possible to send query parameters to an OLE graph on a report (or programatically change any properties of an OLE Graph). However with a Form you do have the ability to change the RowSource of
0
2237
by: Malcolm Cook | last post by:
I've discovered: Using "File > Print Preview" in a form's datasheet view with a server Filter crashes access after previewing... ....that is, unless ServerFilterByForm has been turned off after applying the filter. See the steps to recreate bug below for details.
1
2604
by: sea | last post by:
I have Access 2002 and I am writing this application with a custom menu bar that has a print preview button -- the start up options hide the design window. The problem is that when an open form is viewed in print preview mode by clicking the print preview button, and later closed by clicking on the control X in the top right corner of the preview window, the form simply closes out and there is no more form to be seen, just a blank screen....
2
2220
by: Martin | last post by:
I have encountered a bug in print preview: In my program, data for printing is taken from arrays. When print preview is invoked or page is printed directly, it is ok, but when user prints from print preview, any data that was in array is not draw, so only thing printed is header and footer. Arrays with data are in the same scope as variables holding header and footer data. They do not loose data and they are not reset as I can access...
0
2012
by: John | last post by:
I have a class that creates an AxWebBrowser object in the background, loads some arbitrary html content, then shows the user a print preview. The only problem is, this print preview is a tiny little window on the top left hand corner of the screen. Thinking that this may have something to do with the Print Preview dialog not being able to detect from it's caller's size so that it can set its own size equal to that of the caller, I...
3
8620
by: Chase | last post by:
The print preview dialog will display the preview of the document but will print a blank page when the print icon is clicked. Printing is fine otherwise. Can i set the print icon in the printpreviewdialog to go to the printdialog.
4
3114
by: zz | last post by:
Sorry for posting this here but unfortunatly I couldn't find any appropriate newsgroup for this and since I've been active here with .net question I figured you guys might be able to help. This is a link to a very simple page that contains 2 DIV statements: http://xsinx.no-ip.com:8880/TestEmbedDiv.html One of them is embeded in the other. There is some clipping involved (the red layer is smaller than the yellow one). If you look at...
2
2630
by: Rodo | last post by:
Hi all, We have a "testing report" form at work that we fill with data (typing for now). The form has a table, other lines and a company logo. I can make a windows form that will get the data from the user (although eventually it will need to be read from a serial port) and generate a print preview of the form but I don't know how to display just the printed form (and data) and not the rest of the entry fields or the "print" and "exit"...
7
3417
by: Fareast Adam | last post by:
I try to hide the print preview button that inside <div id="button"> when previewing the page. But the the problem happened the button is always hidden after i closing the preview page. Anyone have an idea how to overcome this? Here is the code; <html> <head> <script language="javascript"> function printpreview() { var OLECMDID = 7; /* OLECMDID values: * 6 - print
0
8485
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8403
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8605
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.