MS Access Query

Results 1 to 2 of 2

Thread: MS Access Query

  1. #1
    Join Date
    Dec 1969

    Default MS Access Query

    I need to build a query that joins the two table in the attached document to this message post. The two tables are Test and New_Closed_tbl_03. The tables are connected by field CSR_CONTACTOID. I want to build the follwoing query:<BR>The user is propmted to select a Start_DT and End_DT as a parameter for a specific time period. I want my result to show the Fund_IM Start_DT and End_DT in the speceified period that Matches the MOST RECENT CSO_CSUM within the time period specified by the parameter.<BR>The test table has the following hiearchy: <BR>CSR_CSM, CSM_CSO, CSO_CSUM <BR><BR>For Example: <BR>If the Fund_IM Start_DT is 7/16/2002 and End_DT = Null<BR>AND<BR>if there is two records for the CSO_CSUM in the specified time period set by the parameter. <BR>(A)CSO_CSUM Start_DT = 7/17/2002 and End_DT = 7/19/2002<BR>(B)CSO_CSUM Start_DT = 7/17/2002 and End_DT = NULL<BR>How do I capture (B) and not (A) in my query result.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: MS Access Query

    Question: Will the End_DT ever be greater than today (i.e. Date())<BR><BR>If it won&#039;t then you can use an IIF<BR>max(iif(isnull(End_DT),date()+1,End_DT))<BR ><BR>this should give you the latest enddate.... refigure to your needs<BR><BR>sponge

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts