Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing report with last entered datas.

Status
Not open for further replies.

thefroggy

Technical User
Apr 20, 2004
31
GB
Hi everyone,

I'm a newby as Access user and not English, be cool on me ;-). I'm trying to do something quite easy but I can't get it work.

I have a form that people will fill up, the form is linked to a table with ~500 different data already stored. I have a cmd button on my form, once all parameters enter to print out a report.
When I click on it, I'm currently printing out all data previously stored in my table (~ 500 pages..).
I only want to print out a report of the last newly introduced data.


How can I do that?

Thanks in advance,


Steph
 
Filter the report that is being printed to the current record ID. You should be ablt to create your command button with the wizard, so MS will write the filter code for you.
 
Thanks Dcurtis,

the problem is that the wizard is not actived (working for a poor company...)
anyway I could do that without the wizard?

Steph
 
Yes, check out the DoCmd command using the WHERE condition.
 
Sorry to be a pain, can you explaina bite more in detail what I need to do.

Thanks,

Stephane
 
Hi here's an example of the query....change field and table names to yours


SELECT tblSuppliers.SUPPLIERS, tblSuppliers.Add1, tblSuppliers.Add2, tblSuppliers.Add3, tblSuppliers.Add4, tblSuppliers.Postcode, tblOrders.OrderNo, tblOrders.Date, tblEngineers.Full, tblEngineers.Title, tblOrderLines.Line, tblOrderLines.Val
FROM ((tblSuppliers INNER JOIN tblOrders ON tblSuppliers.SUPPLIERS = tblOrders.SuppliersName) INNER JOIN tblOrderLines ON tblOrders.OrderNo = tblOrderLines.OrderNo) INNER JOIN tblEngineers ON tblOrders.OrderedBy = tblEngineers.Engineers
WHERE (((tblOrders.OrderNo)=[forms]![frmNewOrder]![orderno]));

The bit at the end decides what record to print based on what is showing on your form
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top