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

Opening a single, particular report

stonward
145 100+
Hi Guys,

I have a main form, based on a query, with a subform based on another, that is used primarily for data input. The whole thing is my QUOTATION form. I want to print (view first) this, and a report is the best method - yes?

How do i get Access to view/print just the current record (or latest ID number) - at present it's always opening/printing ALL the quotations from the table. I've tried using a version of the code for opening a particular form, but that doesn't work.

I've been trying now for several nights and have failed miserably!

Thanx,

Stonward Roy.
Aug 31 '07 #1
3 1556
Scott Price
1,384 Expert 1GB
Hi Guys,

I have a main form, based on a query, with a subform based on another, that is used primarily for data input. The whole thing is my QUOTATION form. I want to print (view first) this, and a report is the best method - yes?

How do i get Access to view/print just the current record (or latest ID number) - at present it's always opening/printing ALL the quotations from the table. I've tried using a version of the code for opening a particular form, but that doesn't work.

I've been trying now for several nights and have failed miserably!

Thanx,

Stonward Roy.

Hi there Stonward,

Here's a brief overview: Create a separate query. If you are wishing to view only record from the main form you can create an exact copy of your main form's query, likewise with the subform. In the design view of the query you will find the column that returns the unique recordID for your form/subform. Enter criteria like this: Forms![YourMainFormName]![IDControlName], where you replace the middle value here with the name of your main form, and the last value with the name of your text box, etc that contains the record id. Base the report on this query.

Now when you open your report (using a command button on the main form, hint hint :-) you get the report filtered by the query to return only the record you are viewing on the main form.

Regards,
Scott
Aug 31 '07 #2
missinglinq
3,532 Expert 2GB
If you already have a report that prints out the data you want for all records, and just want the report for a given record, this should do the trick:

Expand|Select|Wrap|Line Numbers
  1.  DoCmd.OpenReport "YourReportNameHere", acViewNormal, , "[IDField]= '" & Me.IDField & "'" 
where IDField is TEXT and holds the bit of uniquely identifying record data.

Linq ;0)>
Aug 31 '07 #3
stonward
145 100+
Thanks, guys...sorry for the delay in reply.

yep, that sorted it!

Amazing, but that is nowhere in any of the access books i have...in fact it could be construed that they actually lead one away from the answer!

Got another, somewhat larger issue now. If you fancy it, check it out?

Thanks again.

StonwardR
Sep 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
4
by: Jeff | last post by:
I have a need to open a report in design mode immediately before opening it in preview, to change the Minimum and Maximum scale on an axis on a chart. This results in a flash of the report in...
3
by: Greg | last post by:
On my report I want to have an opening balance signifying all transactions up to the month selected and detailed transactions for the month selected and then a closing blance. I'm perpelexed...
9
by: MrSpock | last post by:
1. Create a new Windows Application project. 2. Open the project properties and check "Make single instance application". 3. Build. 4. Go to the release folder and run the application. 5. Try to...
3
by: sara | last post by:
I've been reading all the posts on this topic. Most are years old, so I have 2 questions: 1. Is there any improvement on opening the same report multiple times (with different input parameters...
2
by: Prakash | last post by:
I have 2 tables ... Customer_Master: Cust-Code, Cust_Name Customer_Transactions: Cust_Code, Date, Details, Debit, Credit I would like to generate a report in the foll manner, say from...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
3
by: Paul H | last post by:
I have a transactions table and a balance table that look something like this: tblTransactions TransactionID (PK Autonumber) ClientID TransactionDate TransactionAmount (currency field, values...
6
by: lyle fairfield | last post by:
"dpcman01" <bob@dpcman.com.auwrote in news:48e4a87b$0$31804$afc38c87@news.optusnet.com.au: Much of the code at the MVP site gave excellent results last century. If I were opening a report in...
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
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,...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.