G
Guest
I am trying to return data in which the FundedDate is equal to the previous
month. Here is what I have but it returns an error message
------------------------------------------------------------------------------------------------
Function SQLTest()
Dim strSQL As String
Dim strWhere As String
strSQL = "SELECT
[LoanNum],[B1LastName],[LO],[CloserName],[Investor],[Type],[Purpose],[PropType],[Occupancy],[Product],[TotalLoanAmt],[FundedDate],[LienPosition],[OrigFee],[DiscPts],[RebateAmt],[Gain/Loss],[LeadName],[LOEmail]
FROM [Fundings - SQL Test (Detail)]"
strWhere = DateSerial(Month([FundedDate]), -1)
DoCmd.OpenReport "Fundings by LO - SQL Test", acViewPreview, "", strWhere
End Functio
month. Here is what I have but it returns an error message
------------------------------------------------------------------------------------------------
Function SQLTest()
Dim strSQL As String
Dim strWhere As String
strSQL = "SELECT
[LoanNum],[B1LastName],[LO],[CloserName],[Investor],[Type],[Purpose],[PropType],[Occupancy],[Product],[TotalLoanAmt],[FundedDate],[LienPosition],[OrigFee],[DiscPts],[RebateAmt],[Gain/Loss],[LeadName],[LOEmail]
FROM [Fundings - SQL Test (Detail)]"
strWhere = DateSerial(Month([FundedDate]), -1)
DoCmd.OpenReport "Fundings by LO - SQL Test", acViewPreview, "", strWhere
End Functio