A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query for Max date and previous date for report



 
 
Thread Tools Display Modes
  #11  
Old February 19th, 2007, 01:05 AM posted to microsoft.public.access.queries
DJTI via AccessMonster.com
external usenet poster
 
Posts: 39
Default query for Max date and previous date for report

Duane Hookom wrote:
If you have records displaying on two pages then you must have either section
heights or some property settings that push a record to the second page.


How do I adjust the property settings to keep a record on same page? I have
changed the settings with no difference.
Also, how are you storing or calculating TotalShares?


The TotalShares is not stored, I calculated in subform and thought I could do
the same for a report...I am wrong?

I'm not sure what you actually need. You mention Client but there is no
client table or clientId. I don't know if you want the most recent two by

[quoted text clipped - 31 lines]
Thanks in advance.
Deb


--
Message posted via http://www.accessmonster.com

  #12  
Old February 19th, 2007, 01:24 AM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default query for Max date and previous date for report

Records don't normally get printed on separate pages. I can't see any of the
items I suggested might cause this.

If you can calculate something in a subform, you can probably do the same in
a subreport or subquery or code or whatever.

--
Duane Hookom
Microsoft Access MVP


"DJTI via AccessMonster.com" wrote:

Duane Hookom wrote:
If you have records displaying on two pages then you must have either section
heights or some property settings that push a record to the second page.


How do I adjust the property settings to keep a record on same page? I have
changed the settings with no difference.
Also, how are you storing or calculating TotalShares?


The TotalShares is not stored, I calculated in subform and thought I could do
the same for a report...I am wrong?

I'm not sure what you actually need. You mention Client but there is no
client table or clientId. I don't know if you want the most recent two by

[quoted text clipped - 31 lines]
Thanks in advance.
Deb


--
Message posted via http://www.accessmonster.com


  #13  
Old February 19th, 2007, 12:36 PM posted to microsoft.public.access.queries
DJTI via AccessMonster.com
external usenet poster
 
Posts: 39
Default query for Max date and previous date for report

Hi Duane,

Duane Hookom wrote:
Records don't normally get printed on separate pages. I can't see any of the
items I suggested might cause this.

If you can calculate something in a subform, you can probably do the same in
a subreport or subquery or code or whatever.

How do I select and calculate in a subquery for the [prevdatetransaction] and
[totalshares]? If I can get that in a query, then I can use the values in the
report.

If you have records displaying on two pages then you must have either section
heights or some property settings that push a record to the second page.

[quoted text clipped - 11 lines]
Thanks in advance.
Deb


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200702/1

  #14  
Old February 19th, 2007, 07:22 PM posted to microsoft.public.access.queries
DJTI via AccessMonster.com
external usenet poster
 
Posts: 39
Default query for Max date and previous date for report

I was able to get what I needed with a subquery. Thanks for helping me.
SQL
SELECT [Shareholder Account].ShareholderID, [Shareholder Account].SLName,
[Shareholder Account].ShareholderName, [Shareholder Account].Address,
[Shareholder Account].Address2, [Shareholder Account].City, [Shareholder
Account].State, [Shareholder Account].Country, [Shareholder Account].
PostalCode, Investment.InvestmentID, Investment.PurchaseDate, Investment.
InvestmentAmt, Investment.PurShareValue, Investment.TotalInvValue, Investment.
CumuShares, [Investment Details].InvDetailID, [Investment Details].
DateTransaction, [Investment Details].QDivValue, [Investment Details].
QCashPdValue, [Investment Details].CurShareValue, [Investment Details].
RedeembyShare, [CumuShares]+nz([DivEarned])-nz([RedeembyShare]) AS
TotalShares, Round([QCashPdValue]*[CumuShares],2) AS CashPdTotal, Round(
[TotalShares]*[CurShareValue],2) AS TotalValue, Round([QDivValue]*[CumuShares]
,2) AS DivEarned, Round([RedeembyShare]*[Investment Details].CurShareValue,2)
AS RedeemedAmt, LastTransactionDateqry.LastTransDate, LastTransactionDateqry.
LastTotalShares
FROM [Shareholder Account] INNER JOIN ((Investment INNER JOIN
LastTransactionDateqry ON Investment.InvestmentID = LastTransactionDateqry.
InvestmentID) INNER JOIN [Investment Details] ON Investment.InvestmentID =
[Investment Details].InvestmentID) ON [Shareholder Account].ShareholderID =
Investment.ShareholderID
WHERE ((([Investment Details].DateTransaction)=[RecConfDate]))
ORDER BY [Shareholder Account].SLName, [Investment Details].DateTransaction
DESC;


Duane Hookom wrote:
Records don't normally get printed on separate pages. I can't see any of the
items I suggested might cause this.

If you can calculate something in a subform, you can probably do the same in
a subreport or subquery or code or whatever.

If you have records displaying on two pages then you must have either section
heights or some property settings that push a record to the second page.

[quoted text clipped - 11 lines]
Thanks in advance.
Deb


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200702/1

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.