473,847 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to open a report with a determine field (primary key)

Hello, I want to make a report for a single compressor. Instead of
showing a report for all the compressors. I would like to place a
button in the compressor form, so whenever I want to display a report
from that particular compressor I click the button and the report will
show ONLY that compressor. Each compressor has it own primary key. So i
guess I need to match that pk with my report. Can somebody give me some
ideas ? I am pretty familiar creating reports but I just dont know how
to create a report for a particular data in a particular field

Thankssss

Jul 21 '06 #1
6 1732
"erick-flores" <ch**********@h otmail.comwrote in
news:11******** *************@s 13g2000cwa.goog legroups.com:
Hello, I want to make a report for a single compressor.
Instead of showing a report for all the compressors. I would
like to place a button in the compressor form, so whenever I
want to display a report from that particular compressor I
click the button and the report will show ONLY that
compressor. Each compressor has it own primary key. So i guess
I need to match that pk with my report. Can somebody give me
some ideas ? I am pretty familiar creating reports but I just
dont know how to create a report for a particular data in a
particular field

Thankssss
you can open any report filtered to any expression using the
where parameter of the .openreport method of Docmd

in the OnClick event of the button that opens the form,

Dim stDocName as string
Dim stwhereclause as string

stdocname = "myReport"
stwhereclause = "primaryKey = " & me.txtPrimaryKe y
docmd.openrepor t stdocname,,,stw hereclause

The Wizard does the same thing.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 21 '06 #2

Got it thankss

Jul 21 '06 #3

Hello

OK now, I realize it is showing all the records after the primary key
of the compressor. I though it was going to take only the records
related to that primary key. What I mean is:
Compressor-->Stages-->Cylinders-->Gaskets.... the compressor primary
works fine it shows only the one that is currently displaying on the
form but then it shows all the stages for all the compressors and all
the cylinders for all the compressors and so forth. Is there a way to
link all the records so that only shows one compressor, only the stages
for that compressor, only the cylinders for that compressor, only the
gaskets for that compressor and so on. Any ideas?

Thanks

Jul 21 '06 #4
If your Tables are properly designed and your Report is properly Grouped by
Compressor, selecting the specific CompressorID should give you what you
want. Maybe if you were to clarify your Table / data layout, and some
details on how you created the Report, someone could offer useful
suggestions.

Larry Linson
Microsoft Access MVP

"erick-flores" <ch**********@h otmail.comwrote in message
news:11******** **************@ 75g2000cwc.goog legroups.com...
>
Hello

OK now, I realize it is showing all the records after the primary key
of the compressor. I though it was going to take only the records
related to that primary key. What I mean is:
Compressor-->Stages-->Cylinders-->Gaskets.... the compressor primary
works fine it shows only the one that is currently displaying on the
form but then it shows all the stages for all the compressors and all
the cylinders for all the compressors and so forth. Is there a way to
link all the records so that only shows one compressor, only the stages
for that compressor, only the cylinders for that compressor, only the
gaskets for that compressor and so on. Any ideas?

Thanks

Jul 21 '06 #5
"erick-flores" <ch**********@h otmail.comwrote in
news:11******** **************@ 75g2000cwc.goog legroups.com:
OK now, I realize it is showing all the records after the primary
key of the compressor. I though it was going to take only the
records related to that primary key. What I mean is:
Compressor-->Stages-->Cylinders-->Gaskets.... the compressor
primary works fine it shows only the one that is currently
displaying on the form but then it shows all the stages for all
the compressors and all the cylinders for all the compressors and
so forth. Is there a way to link all the records so that only
shows one compressor, only the stages for that compressor, only
the cylinders for that compressor, only the gaskets for that
compressor and so on. Any ideas?
Sounds like you have subreports on your main report that are not
filtered by the link properties.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '06 #6

I checked my grouping and the problem was in there, thanks

Jul 21 '06 #7

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

Similar topics

1
5838
by: P | last post by:
Hi, Access 2002. I am trying to use the PrintOut function to print the current record of the current open form in landscape format to the default Windows printer. Any suggestion on how to set the printout to landscape mode? Thank you. P
1
2513
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing the results from my grouped fields to the totals. first, let me say that this is a really long post. i wasn't sure how much information/ background to provide, so i thought more was better than less. i tried to delineate certain areas so that it would be easy to peruse my posting and find...
5
38653
by: Sami | last post by:
I can create queries and reports based on info from one table. How do I create one using information from multiple tables. What do I need to make sure the information from one table will be correctly assigned to specific person from another table? Thanks.
2
1446
by: braley | last post by:
I am using MS Access 2003 and am in the process of creating a database that contains contact information and attendance data for a group of volunteers. I have created a table that contains all of the fields for contact data and set the Full_Name as the primary index in that table. I have also set up a table which contains Yes/No fields for each month of the year in which to mark attendance. This table also includes the Full_Name field...
1
6896
by: pemigh | last post by:
I have a report with pages breaking in the middle of text box controls. And it's not just on a line-by-line basis, but sometimes (in a situation that I can no longer recreate) just the bottom portions of a line's letters were showing up at the top of a page. My experiments show that Access will ordinarily break before a text box if the whole thing won't fit, but I haven't been able to find a property that will control this behavior. I...
1
1902
by: Andy_Khosravi | last post by:
I'm having trouble building a query to gather the information I need from a table. I need to be able to assemble an inventory report that displays receipts, output, and running inventory from a table named tblHistory. My setup: I am running A97. I have one table called tblIssues linked in a one-to-many-relationship with a table called tblHistory. The tblIssues table contains the issue header information, while the tblHistory table...
9
5744
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo field is printed within the detailed area. The problem is, the apllication is not setup properly, thus the users are entering data within the memo field as: location1 1/1/2005 1/1/2006
1
5370
by: mark_aok | last post by:
Hi all, I have a situation where I need to determine a specific table's primary key, and then output it. I have tried the Database Object, and the Record Object, but I've had no luck. Ideally there would be something like,
6
9435
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
0
9879
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
10981
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
10643
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...
0
9477
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7879
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5716
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...
0
5907
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4521
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
3
3158
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.