473,385 Members | 1,429 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,385 software developers and data experts.

Printing new record on form

I have a form with a print button on it which opens a report. I specify the
id in the where clause in the OpenReport statemt say the report prints for
the current record. This works fine for existing records in the table. But
when I add a new record I have to arrow backward and then forward to get it
to print. I tried Me.Requery but it sent me to the first record in the
table.

How can I print the current record on the form?
Robert
May 4 '07 #1
2 1906
On Fri, 4 May 2007 10:49:34 -0400, Robert wrote:
I have a form with a print button on it which opens a report. I specify the
id in the where clause in the OpenReport statemt say the report prints for
the current record. This works fine for existing records in the table. But
when I add a new record I have to arrow backward and then forward to get it
to print. I tried Me.Requery but it sent me to the first record in the
table.

How can I print the current record on the form?

Robert
Access does not save new records until you either go to a different
record (that's why iot works when you go backward or forward), close
the form/database or expressly tell it to save the data.

In the click event of the code used to open the report:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName", acViewPreview, , etc.....
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
May 4 '07 #2
Thank you!
"fredg" <fg******@example.invalidwrote in message
news:7u******************************@40tude.net.. .
On Fri, 4 May 2007 10:49:34 -0400, Robert wrote:
>I have a form with a print button on it which opens a report. I specify
the
id in the where clause in the OpenReport statemt say the report prints
for
the current record. This works fine for existing records in the table.
But
when I add a new record I have to arrow backward and then forward to get
it
to print. I tried Me.Requery but it sent me to the first record in the
table.

How can I print the current record on the form?

Robert

Access does not save new records until you either go to a different
record (that's why iot works when you go backward or forward), close
the form/database or expressly tell it to save the data.

In the click event of the code used to open the report:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName", acViewPreview, , etc.....
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

May 4 '07 #3

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

Similar topics

4
by: John Baker | last post by:
Hi: I have a form, which contains a sub form (Employee main record and payment record). It all shows up fine in a screen view, but when I come to print it I find that I cannot get the sub form...
4
by: Sami | last post by:
I hope someone will tell me how to do this without having to do any VB as I know nothing in that area. I am a rank beginner in using Access. I have created a database consisting of student...
1
by: Frank.Sebesta | last post by:
I have a employees database with a picture that shows on a form with employee information. Similar to the Northwinds sample database. When I print the record, my output is only the data and does...
5
by: John | last post by:
Hi If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values? Thanks ...
5
by: bobh | last post by:
Hi All, A clients database (built by another and not very well but, its what I have to work with) has bound forms that display customer information and when printed is three pages long. The...
4
by: paquer | last post by:
Hello' How do I get the subform to print along with the main form? I want my user's to be able to go in the field with a printout of the info they need to populate in the database. So when they...
1
by: paquer | last post by:
I have forms that are used in the office as well as in the field. I want user's to be able to print out an exact copy of the form for "in the field" data entry. (Yes we are still stuck in the 90's....
3
by: Dave | last post by:
Hello! What's the best way to make a button print *just* the selected (displayed) record of a subform, when that subform is currently part of a larger form? Thanks!
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
1
by: ccmanc68 | last post by:
I would like to print two reports a once. The first report is a sign sheet; the second is an order form. The sign sheet contains the same information as the order form but has a different layout. ...
0
isladogs
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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...

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.