Hi, this is my first post on this site, so my apologies if I have done this wrong. I'll also apologise for my spelling as I'm dyslexic.
I'm having a problem with a Report from my database. I have 'Project Basic', 'Project Details' and 'Design Versions' tables and they are linked by the 'Project Reference Number'. I want to produce a report using data from all three tables, ordered by Project, so I used a query to gather the data (see the sql below), then based the report on the query. I have three entrees in the tables but the report will only work with one of the records and not with the other entries.
I'm using Access 2003 on XP. - SELECT [Project Basic].[Project Refrance Number], [Project Basic].*, [Design Versions].*, [Project Details].*
-
FROM ([Design Versions] INNER JOIN [Project Basic] ON [Design Versions].[Project Refrance Number] = [Project Basic].[Project Refrance Number]) INNER JOIN [Project Details] ON [Project Basic].[Project Refrance Number] = [Project Details].[Project Refrance Number]
-
WHERE ((([Project Basic].[Project Refrance Number])=[Forms]![Print Project List]![txtPRN]));
5 1248
Hi, this is my first post on this site, so my apologies if I have done this wrong. I'll also apologise for my spelling as I'm dyslexic.
I'm having a problem with a Report from my database. I have 'Project Basic', 'Project Details' and 'Design Versions' tables and they are linked by the 'Project Reference Number'. I want to produce a report using data from all three tables, ordered by Project, so I used a query to gather the data (see the sql below), then based the report on the query. I have three entrees in the tables but the report will only work with one of the records and not with the other entries.
I'm using Access 2003 on XP. - SELECT [Project Basic].[Project Refrance Number], [Project Basic].*, [Design Versions].*, [Project Details].*
-
FROM ([Design Versions] INNER JOIN [Project Basic] ON [Design Versions].[Project Refrance Number] = [Project Basic].[Project Refrance Number]) INNER JOIN [Project Details] ON [Project Basic].[Project Refrance Number] = [Project Details].[Project Refrance Number]
-
WHERE ((([Project Basic].[Project Refrance Number])=[Forms]![Print Project List]![txtPRN]));
Your WHERE clause restricts the query results to one record, as only one Project Reference Number can be returned from the text box. (as an aside, there is a misspelling in your field name: Project Refrance Number... Not a problem as long as you know what it is talking about, and it is used consistently!)
To see all records, remove the WHERE criteria.
Regards,
Scott
Your WHERE clause restricts the query results to one record, as only one Project Reference Number can be returned from the text box. (as an aside, there is a misspelling in your field name: Project Refrance Number... Not a problem as long as you know what it is talking about, and it is used consistently!)
To see all records, remove the WHERE criteria.
Regards,
Scott
Thanks for your reply Scott. I only want to print one project. When the project is selected from the Print Project List form, it returns no records, that is unless it's the record for Project RM0336.
I have restarted the database and set the query again, but with no luck. I'm trying with a sub form looking at separate queries, not too sure if this will work though.
Thanks for your reply Scott. I only want to print one project. When the project is selected from the Print Project List form, it returns no records, that is unless it's the record for Project RM0336.
I have restarted the database and set the query again, but with no luck. I'm trying with a sub form looking at separate queries, not too sure if this will work though.
Hmm... Just checking your FROM clause. You are setting the results to be returned from Design Versions. Are all three records present in all three tables?
If your main Project information is stored in Project Basic, you should reword your FROM clause to choose from that table.
If this by itself doesn't work, you may also need to investigate right/left joins.
To do this: In query design view grid, double click the line representing the relationship between each table. This will bring up the dialog box allowing you to set the properties for the join. Choose the appropriate join from the three options.
Regards,
Scott
Thanks Scott for your help. I managed to get round the problem by using subforms. This should do for now and I can look into this later.
Again, thanks for your help!!
Thanks Scott for your help. I managed to get round the problem by using subforms. This should do for now and I can look into this later.
Again, thanks for your help!!
You're welcome, Ian. Glad you got something working for you!
Regards,
Scott
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Reginald |
last post by:
I am trying to create a query based on 1 of 3 date fields from a table
called "T40".
the first date is T40RbtDte, 2nd is T40RbtRecDte, 3rd is T40RbtDueDte.
I have created a form to alow the user...
|
by: Nathan Bloomfield |
last post by:
Does anyone know if there is any documentation which relates to Access2k + ?
or can anyone help adjust the code?
I am having trouble converting the DAO references.
TITLE :INF: How to...
|
by: Pax S |
last post by:
I need a button that will check (make true) two check boxes (fields)
For the record that has the focus (the record on the form that I am
presently looking at). The two check boxes would be like a...
|
by: lorirobn |
last post by:
Hi,
I have a report that works just fine.
Now I would like to add the capability to choose selection criteria to
limit what is displayed. I created several reports that do this, but
they used...
|
by: highbulp |
last post by:
I'm trying to use the DCount() function in the Report Header of a new report. The ReportSource for this report is a parametered Query. My DCount call looks like:
DCount("","","=1")
where...
|
by: lorirobn |
last post by:
Hi,
I have a report displaying items that are missing from a room. I
created 2 queries, the first getting the items IN the room, and the
second being an "unmatched" query that references the...
|
by: creative1 |
last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
|
by: Oko |
last post by:
I'm currently developing an MS Access Data Project (.adp) in MS Access
2002.
One of the reports within the DB uses data that is Dynamic and cannot
be stored on the SQL Server. To resolve this, I...
|
by: Evanescent |
last post by:
Hi guys, as the title suggests, I'm facing some problems with the report.
I have a form (createInvoiceForm) whereby the user can enter the invoice's details and then click on the Add New Record...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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: 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...
|
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,...
|
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: 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...
|
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...
| |