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  

DLookup Function



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2006, 08:08 PM posted to microsoft.public.access.queries
QC Coug
external usenet poster
 
Posts: 5
Default DLookup Function

In one table I have a transaction date, in a second table I have the closing
dates for the accounting periods. In the same table as the closing dates I
have the fiscal month and fiscal year that represent the closing date. In a
query I would like to pull in the fiscal month and fiscal year based on teh
transaction date.
  #2  
Old November 21st, 2006, 08:24 PM posted to microsoft.public.access.queries
QC Coug
external usenet poster
 
Posts: 5
Default DLookup Function

So I want to look up the first period that has a closing date greater than
the transaction date.

"QC Coug" wrote:

In one table I have a transaction date, in a second table I have the closing
dates for the accounting periods. In the same table as the closing dates I
have the fiscal month and fiscal year that represent the closing date. In a
query I would like to pull in the fiscal month and fiscal year based on teh
transaction date.

  #3  
Old November 21st, 2006, 08:27 PM posted to microsoft.public.access.queries
QC Coug
external usenet poster
 
Posts: 5
Default DLookup Function

Here is my current formula.

DLookUp("[Fiscal
Month]","ACCTG_PERIODS","[dbo_SOP10200]![ReqShipDate]=[ACCTG_PERIODS]![Closing Date]")

Fiscal Month = field name withing the ACCTG_PERIODS table
[dbo_SOP10200]![ReqShipDate] = table and field name of the transaction date
[ACCTG_PERIODS]![Closing Date] = table and field name of the closing date

"QC Coug" wrote:

So I want to look up the first period that has a closing date greater than
the transaction date.

"QC Coug" wrote:

In one table I have a transaction date, in a second table I have the closing
dates for the accounting periods. In the same table as the closing dates I
have the fiscal month and fiscal year that represent the closing date. In a
query I would like to pull in the fiscal month and fiscal year based on teh
transaction date.

  #4  
Old November 21st, 2006, 08:31 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default DLookup Function

=DMin("[FiscalMonth]", "SecondTable", "[ClosingDate] #" & TransActionDate &
"#"

I think the DMin function will work better for this. Since I don't know
where you will have the Transaction Date, I dummied it up for the example.
Just replace it with the reference to where you have the Transaction Date.

"QC Coug" wrote:

So I want to look up the first period that has a closing date greater than
the transaction date.

"QC Coug" wrote:

In one table I have a transaction date, in a second table I have the closing
dates for the accounting periods. In the same table as the closing dates I
have the fiscal month and fiscal year that represent the closing date. In a
query I would like to pull in the fiscal month and fiscal year based on teh
transaction date.

 




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 10:57 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.