Need Help for a Query.....

  • Thread starter Malik via AccessMonster.com
  • Start date
M

Malik via AccessMonster.com

Hi,

I Have Some Tables,
----------------------
TblCusutomers
TblSales
TblSalesBody
TblDrVoucher
TblDrVoucherBody
----------------------------
These tables have some Linked Fields.

Now When I creat a Query to get record from these tables, but It show the
records of tables in one Line,
I want that it show the First table Records on Top and 2nd Table Record Under
It.

Thanks
 
M

Malik via AccessMonster.com

Problem is that it shows data again and again till the both Tbale record is
complete...

Let me make it more clear

If "Tblsales" have 10 records
and "TblDrVouchers" have 15.

Now it will show

"TblSales record * 15 times(As "TblDrVoucher" has 15 Records).

and

"TblDrVouchers" * 10 times (As "TblSales" Has 10 Records).

Tell me if more Detail is required.

Thanks
 
J

Jeff Boyce

I'm not understanding your situation from your description...

What do you mean by "tables have some Linked Fields"?

A standard query in Access shows the first record on the first line, the
second on the second line, and so on ... I don't understand how your query
is showing all records on one line.

Please post the SQL statement of your query.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

Malik via AccessMonster.com

Jeff said:
I'm not understanding your situation from your description...
Linked fields mean Related Field.

It is showing One record in One Field But , Not As I want

I want It mudt show all recorde by SaleId first and by Voucher Id After.

Here is its SQL View,

SELECT TblSales.SaleId, TblSales.CustomerId AS TblSales_CustomerId,
TblCustomers.CustomerName, TblSales.Date AS TblSales_Date, TblSales.Freight,
TblSalesBody.CommId, TblSalesBody.NoOfBags, TblSalesBody.Rate, TblDrVoucher.
VoucherId, TblDrVoucher.Date AS TblDrVoucher_Date, TblDrVoucher.CustomerId AS
TblDrVoucher_CustomerId, TblDrVoucherBody.AmountDr, TblDrVoucherBody.
Narration
FROM ((TblCustomers INNER JOIN (TblSales INNER JOIN TblSalesBody ON TblSales.
SaleId = TblSalesBody.SaleId) ON TblCustomers.CustomerId = TblSales.
CustomerId) INNER JOIN TblDrVoucher ON TblCustomers.CustomerId = TblDrVoucher.
CustomerId) INNER JOIN TblDrVoucherBody ON TblDrVoucher.VoucherId =
TblDrVoucherBody.VoucherId;
 
J

Jeff Boyce

I'm sorry, but I'm still not understanding what you are trying to
accomplish.

Is there a chance that you need to be using a Left or Right JOIN instead?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

malik via AccessMonster.com

Jeff said:
I'm sorry, but I'm still not understanding what you are trying to
accomplish.
Leave It .. But Thanks to give me ur time.

leave It.

Now I am telling u that what i m really want to do..

I Want to creat the Following Report.

------------------------------------------------------------------------------
-----------------------------------------------
---------
TransactionID CR
DR BALANCE
------------------------------------------------------------------------------
----------------------------------------------
---------
"This Field must from Query Sales" 233.00
233.00 cr
"This Field must from Query DrVoucher" 33.
00 200.00 cr



I mean I want to adjust Two Diffrent Queries on One Report....
I m not geeting result while running Union queries or by Sub Report..

Now Plz Suggest me something..

Thanks
 
M

Malik via AccessMonster.com

------------------------------------------------------------------------------
--------
---------
TransactionID CR DR BALANCE
------------------------------------------------------------------------------
-------
---------
Field from QuerySaleId 233.00 233.00 cr
Field from QueryDrvoucher 33.00 200.00 cr
Field from QuerySaleId 500.00 700.00 cr


Here is the correct view
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top