PC Review


Reply
Thread Tools Rate Thread

Access 2000 query criteria

 
 
=?Utf-8?B?TWFyeUxvdQ==?=
Guest
Posts: n/a
 
      22nd Mar 2007
I am using a query I made in Jobboss and I need HELP.

I am working with 3 tables

I have invoices that I can sort and pull up fine (could be 20 items) but
when I add a date and payment I get only the the items paid.

I am sorting job and ship date and I want to include invoice paid and unpaid
and their dates.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      22nd Mar 2007
Hi

Can you the sql - you should get a better answer it you do

--
Wayne
Manchester, England.



"MaryLou" wrote:

> I am using a query I made in Jobboss and I need HELP.
>
> I am working with 3 tables
>
> I have invoices that I can sort and pull up fine (could be 20 items) but
> when I add a date and payment I get only the the items paid.
>
> I am sorting job and ship date and I want to include invoice paid and unpaid
> and their dates.

 
Reply With Quote
 
=?Utf-8?B?TWFyeUxvdQ==?=
Guest
Posts: n/a
 
      22nd Mar 2007
I don't know how to sql.
Can you help me out with this?
(E-Mail Removed)

"Wayne-I-M" wrote:

> Hi
>
> Can you the sql - you should get a better answer it you do
>
> --
> Wayne
> Manchester, England.
>
>
>
> "MaryLou" wrote:
>
> > I am using a query I made in Jobboss and I need HELP.
> >
> > I am working with 3 tables
> >
> > I have invoices that I can sort and pull up fine (could be 20 items) but
> > when I add a date and payment I get only the the items paid.
> >
> > I am sorting job and ship date and I want to include invoice paid and unpaid
> > and their dates.

 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      22nd Mar 2007
Hi

Open the query in design view and select View at the top of the screen -
select sql and copy the code and paste it so others on the forum can see it.

I have to go out now but someone else will look at it and it will let them
know what your query is doing and (maybe) why it's going wrong


--
Wayne
Manchester, England.



"MaryLou" wrote:

> I don't know how to sql.
> Can you help me out with this?
> (E-Mail Removed)
>
> "Wayne-I-M" wrote:
>
> > Hi
> >
> > Can you the sql - you should get a better answer it you do
> >
> > --
> > Wayne
> > Manchester, England.
> >
> >
> >
> > "MaryLou" wrote:
> >
> > > I am using a query I made in Jobboss and I need HELP.
> > >
> > > I am working with 3 tables
> > >
> > > I have invoices that I can sort and pull up fine (could be 20 items) but
> > > when I add a date and payment I get only the the items paid.
> > >
> > > I am sorting job and ship date and I want to include invoice paid and unpaid
> > > and their dates.

 
Reply With Quote
 
=?Utf-8?B?TWFyeUxvdQ==?=
Guest
Posts: n/a
 
      22nd Mar 2007
As requested:

SELECT Invoice_Detail.Part_Number, Invoice_Detail.Job,
Invoice_Detail.Ship_Date, Invoice_Detail.Packlist, Invoice_Detail.Document,
Invoice_Detail.Quantity, Invoice_Header.Paid_Date,
Invoice_Receipt.Amount_Applied, Invoice_Receipt.Last_Updated
FROM (Invoice_Header INNER JOIN Invoice_Receipt ON Invoice_Header.Document =
Invoice_Receipt.Invoice) INNER JOIN Invoice_Detail ON Invoice_Header.Document
= Invoice_Detail.Document
WHERE (((Invoice_Detail.Job)="14117B-A") AND ((Invoice_Detail.Ship_Date)
Between #1/1/2007# And #3/30/2007#))
ORDER BY Invoice_Detail.Ship_Date;

"Wayne-I-M" wrote:

> Hi
>
> Open the query in design view and select View at the top of the screen -
> select sql and copy the code and paste it so others on the forum can see it.
>
> I have to go out now but someone else will look at it and it will let them
> know what your query is doing and (maybe) why it's going wrong
>
>
> --
> Wayne
> Manchester, England.
>
>
>
> "MaryLou" wrote:
>
> > I don't know how to sql.
> > Can you help me out with this?
> > (E-Mail Removed)
> >
> > "Wayne-I-M" wrote:
> >
> > > Hi
> > >
> > > Can you the sql - you should get a better answer it you do
> > >
> > > --
> > > Wayne
> > > Manchester, England.
> > >
> > >
> > >
> > > "MaryLou" wrote:
> > >
> > > > I am using a query I made in Jobboss and I need HELP.
> > > >
> > > > I am working with 3 tables
> > > >
> > > > I have invoices that I can sort and pull up fine (could be 20 items) but
> > > > when I add a date and payment I get only the the items paid.
> > > >
> > > > I am sorting job and ship date and I want to include invoice paid and unpaid
> > > > and their dates.

 
Reply With Quote
 
andrewsmitchell@gmail.com
Guest
Posts: n/a
 
      22nd Mar 2007
I'm guessing that you need an 'outer' (right or left) join so that
'all' records will be shown.

To accomplish this, in the 'query designer':

(preliminary: you might want to arrange your tables - left to right:
invoice_detail, invoice_header, invoice_receipt)

1) right click on the 'join' (in the upper window - the 'line' between
the tables

2) select 'join properties'

3) click the option that says 'include all records from
'invoice_detail' and only...

4) do the same for the 2nd join - between the tables Invoice_Header
and Invoice_Receipt (selecting all records from Invoice_Header)


SELECT Invoice_Detail.Part_Number, Invoice_Detail.Job,
Invoice_Detail.Ship_Date, Invoice_Detail.Packlist,
Invoice_Detail.Document, Invoice_Detail.Quantity,
Invoice_Header.Paid_Date, Invoice_Receipt.Amount_Applied,
Invoice_Receipt.Last_Updated
FROM (Invoice_Header LEFT JOIN Invoice_Receipt ON
Invoice_Header.Document = Invoice_Receipt.Invoice) RIGHT JOIN
Invoice_Detail ON Invoice_Header.Document = Invoice_Detail.Document
WHERE (((Invoice_Detail.Job)="14117B-A") AND
((Invoice_Detail.Ship_Date) Between #1/1/2007# And #3/30/2007#))
ORDER BY Invoice_Detail.Job, Invoice_Detail.Ship_Date;



Andy

 
Reply With Quote
 
=?Utf-8?B?TWFyeUxvdQ==?=
Guest
Posts: n/a
 
      22nd Mar 2007
Thank you so much, it works great.
Mary Lou

"(E-Mail Removed)" wrote:

> I'm guessing that you need an 'outer' (right or left) join so that
> 'all' records will be shown.
>
> To accomplish this, in the 'query designer':
>
> (preliminary: you might want to arrange your tables - left to right:
> invoice_detail, invoice_header, invoice_receipt)
>
> 1) right click on the 'join' (in the upper window - the 'line' between
> the tables
>
> 2) select 'join properties'
>
> 3) click the option that says 'include all records from
> 'invoice_detail' and only...
>
> 4) do the same for the 2nd join - between the tables Invoice_Header
> and Invoice_Receipt (selecting all records from Invoice_Header)
>
>
> SELECT Invoice_Detail.Part_Number, Invoice_Detail.Job,
> Invoice_Detail.Ship_Date, Invoice_Detail.Packlist,
> Invoice_Detail.Document, Invoice_Detail.Quantity,
> Invoice_Header.Paid_Date, Invoice_Receipt.Amount_Applied,
> Invoice_Receipt.Last_Updated
> FROM (Invoice_Header LEFT JOIN Invoice_Receipt ON
> Invoice_Header.Document = Invoice_Receipt.Invoice) RIGHT JOIN
> Invoice_Detail ON Invoice_Header.Document = Invoice_Detail.Document
> WHERE (((Invoice_Detail.Job)="14117B-A") AND
> ((Invoice_Detail.Ship_Date) Between #1/1/2007# And #3/30/2007#))
> ORDER BY Invoice_Detail.Job, Invoice_Detail.Ship_Date;
>
>
>
> Andy
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop Access re-arranging query criteria onto multiple criteria lines for OR condition Chrisso Microsoft Access 3 9th Nov 2007 11:50 AM
Query Criteria in Access =?Utf-8?B?S29vcm9zaA==?= Microsoft Access Queries 1 25th Jun 2007 08:27 AM
Access 2000 query criteria =?Utf-8?B?Y2xpcHBlcjg=?= Microsoft Access 4 15th Feb 2007 04:36 PM
Problems specifying date field criteria in an Access 2000 query... Brad Pears Microsoft Access Form Coding 4 21st Sep 2005 05:46 AM
Access query criteria =?Utf-8?B?c2N1YmFqYnM=?= Windows XP Help 1 11th Jun 2004 06:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:14 PM.