#s to be presented as Months

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a query that I want to be grouped, by month order, on my report. I
derived the month 'number' of all my records by using .......... Month:
DatePart("m",[Date]) .......... in the query and I now want the number to be
replaced by the NAME of the month in the report.

I tried this DLookUp formula

=DLookUp("[MonthName]","MonthsoftheYear","MonthID = '" & [Month] & "'")

as I have created a table with the MonthID [or #] and the MonthName, though
the control comes back with a ......... #Error

Can anyone point me in the right direction? TIA
 
It's sound that the month is a number type, in that case the dlookup should
look like that
=DLookUp("[MonthName]","MonthsoftheYear","MonthID = " & [Month])
 
If you still have the original date field then this will give you the month
name

=Format([DateField],"mmmm")
 
Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to
DLookUp and merrily put ' ' all over the place ............
--
Sue Compelling


Ofer said:
It's sound that the month is a number type, in that case the dlookup should
look like that
=DLookUp("[MonthName]","MonthsoftheYear","MonthID = " & [Month])



Sue Compelling said:
Hi

I have a query that I want to be grouped, by month order, on my report. I
derived the month 'number' of all my records by using .......... Month:
DatePart("m",[Date]) .......... in the query and I now want the number to be
replaced by the NAME of the month in the report.

I tried this DLookUp formula

=DLookUp("[MonthName]","MonthsoftheYear","MonthID = '" & [Month] & "'")

as I have created a table with the MonthID [or #] and the MonthName, though
the control comes back with a ......... #Error

Can anyone point me in the right direction? TIA
 
Happy to help, have a nice weekend

Sue Compelling said:
Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to
DLookUp and merrily put ' ' all over the place ............
--
Sue Compelling


Ofer said:
It's sound that the month is a number type, in that case the dlookup should
look like that
=DLookUp("[MonthName]","MonthsoftheYear","MonthID = " & [Month])



Sue Compelling said:
Hi

I have a query that I want to be grouped, by month order, on my report. I
derived the month 'number' of all my records by using .......... Month:
DatePart("m",[Date]) .......... in the query and I now want the number to be
replaced by the NAME of the month in the report.

I tried this DLookUp formula

=DLookUp("[MonthName]","MonthsoftheYear","MonthID = '" & [Month] & "'")

as I have created a table with the MonthID [or #] and the MonthName, though
the control comes back with a ......... #Error

Can anyone point me in the right direction? TIA
 
If you still there, then using a dlookup with date it should be a follow

=DLookUp("[MonthName]","MonthsoftheYear","Date = #" & [Date] & "#")

Sue Compelling said:
Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to
DLookUp and merrily put ' ' all over the place ............
--
Sue Compelling


Ofer said:
It's sound that the month is a number type, in that case the dlookup should
look like that
=DLookUp("[MonthName]","MonthsoftheYear","MonthID = " & [Month])



Sue Compelling said:
Hi

I have a query that I want to be grouped, by month order, on my report. I
derived the month 'number' of all my records by using .......... Month:
DatePart("m",[Date]) .......... in the query and I now want the number to be
replaced by the NAME of the month in the report.

I tried this DLookUp formula

=DLookUp("[MonthName]","MonthsoftheYear","MonthID = '" & [Month] & "'")

as I have created a table with the MonthID [or #] and the MonthName, though
the control comes back with a ......... #Error

Can anyone point me in the right direction? TIA
 
Back
Top