473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to print the current record

Ste
Hi,

I would like to print the current showing record from the Form screen but
don't know where to start.

Here are what I have:

I can print any records from report built from query that has filter setup.
But if I am in data entry Form, and want to get the record displayed to
print out in the same format of report, I can't.

I try to add a button on the data entry Form, which opens another form with
a report button. But that would print all records. I don't want to enter
any more filter manually, instead I want it to go ahead printing by the
[form]![formName]![RecordPrimaryKeyName] that are on the screen, etc..

Any help is appreciated.

Ste
May 23 '07 #1
2 2887
Ste,

I use something like the following to print the record currently on screen:
strWhere = "[ID] = """ & Me.[ID] & """"

DoCmd.OpenReport "ReportName", acPreview, , strWhere

Anthony

Ste wrote:
>Hi,

I would like to print the current showing record from the Form screen but
don't know where to start.

Here are what I have:

I can print any records from report built from query that has filter setup.
But if I am in data entry Form, and want to get the record displayed to
print out in the same format of report, I can't.

I try to add a button on the data entry Form, which opens another form with
a report button. But that would print all records. I don't want to enter
any more filter manually, instead I want it to go ahead printing by the
[form]![formName]![RecordPrimaryKeyName] that are on the screen, etc..

Any help is appreciated.

Ste
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200705/1

May 23 '07 #2
Hi

You can do it by filtering the Query in the record source of the
Report

by putting in th ecriteria of the linked field (EmployeeID) for
example

[Forms]![FormName]![FieldName]

You can find many similar exmaples and others on the followin g:

http://www.access-forum.com/plus/viewforum.php?f=41

Hany
www.access-forum.com
biganthony via AccessMonster.com :
Ste,

I use something like the following to print the record currently on screen:
strWhere = "[ID] = """ & Me.[ID] & """"

DoCmd.OpenReport "ReportName", acPreview, , strWhere

Anthony

Ste wrote:
Hi,

I would like to print the current showing record from the Form screen but
don't know where to start.

Here are what I have:

I can print any records from report built from query that has filter setup.
But if I am in data entry Form, and want to get the record displayed to
print out in the same format of report, I can't.

I try to add a button on the data entry Form, which opens another form with
a report button. But that would print all records. I don't want to enter
any more filter manually, instead I want it to go ahead printing by the
[form]![formName]![RecordPrimaryKeyName] that are on the screen, etc..

Any help is appreciated.

Ste

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200705/1
May 26 '07 #3

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

Similar topics

1
by: SAN CAZIANO | last post by:
I have to insert a button in the left of all record in a table to print the current record, simply create a table and print it in the printer. anyone have an idea or there is a printer/report...
1
by: Aftershock | last post by:
I have looked on the groups but can't seem to find an answer. I have a parameter query that uses a form for its input. This form then opens up a search result form based on the query. It is from...
0
by: Nick H | last post by:
Hi, I have a form containing a subform. I have placed some vb within the subform to print the current record. When I use this vb from within the main form, it prints all of the records for the...
2
by: Paul Mendez | last post by:
I have a form that consists of 150 records and is still growing. there are times when I want to print a certain record of the form, say record 12. I go to file --> print and choose the page number...
3
by: sea | last post by:
I need to be able to print the current form because the form has an embedded object of a .gif file, so report will not work -- does anyone know the way to do this? I tried some code, not sure what...
1
by: Randy | last post by:
I have tried the code to attach a button to a form and use the help information on coding, but I can't seem to get it to work. I have a main form called MAIN CLIENT INFO2 There is a subform...
3
by: simonmarkjones | last post by:
Hi i need to be able to print a report to act as a receipt for customers. If i put a button on a form to do this it wont print the current details on a newly created form (Prints Report with no...
1
by: hosi | last post by:
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...
2
by: dmorand | last post by:
When I try to print a 'print version' of my page it looks fine in IE 7, but when I print in IE 6 the margins are all screwed up. The page itself looks the same in both browsers, it's just when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...

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.