Hi
I am using Dlookup in a Query and it's not showing the desired results when looking up dates i.e. some fields are showing the correct month, some fields are blank, and other fields are showing the incorrect month.
I have created a union query called Qry_Commission_Export that includes a lookup column titled Agent Month: DLookUp("RDMonth","Tbl_ReportingDates","RDDate = #" & [Agent Date] & "#").
RDMonth is a column in the ReportingDates table and the data type is short text. It contains the months of the year i.e. January, February etc.
RDDate is a column in the ReportingDates table and the data type is date/time. It includes dates that fall into months of the year.
Agent Date is a column in the Qry_Commission_Export Query and is a calculation based on two other date columns.
What I am trying to achieve is the following:
When I run the Qry_Commission_Export Query, I want the Agent Month Column to show the Month of the year located in the RDMonth column in the ReportingDates table, where the RDDate in the ReportingDates table is equal to the Agent Date column in the Qry_Commission_Export Query.
I hope this makes sense.
Your help would be much appreciated.
Kind Regards
Nick
I am using Dlookup in a Query and it's not showing the desired results when looking up dates i.e. some fields are showing the correct month, some fields are blank, and other fields are showing the incorrect month.
I have created a union query called Qry_Commission_Export that includes a lookup column titled Agent Month: DLookUp("RDMonth","Tbl_ReportingDates","RDDate = #" & [Agent Date] & "#").
RDMonth is a column in the ReportingDates table and the data type is short text. It contains the months of the year i.e. January, February etc.
RDDate is a column in the ReportingDates table and the data type is date/time. It includes dates that fall into months of the year.
Agent Date is a column in the Qry_Commission_Export Query and is a calculation based on two other date columns.
What I am trying to achieve is the following:
When I run the Qry_Commission_Export Query, I want the Agent Month Column to show the Month of the year located in the RDMonth column in the ReportingDates table, where the RDDate in the ReportingDates table is equal to the Agent Date column in the Qry_Commission_Export Query.
I hope this makes sense.
Your help would be much appreciated.
Kind Regards
Nick