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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#s to be presented as Months
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 -- Sue Compelling |
#2
|
|||
|
|||
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" wrote: 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 -- Sue Compelling |
#3
|
|||
|
|||
If you still have the original date field then this will give you the month
name =Format([DateField],"mmmm") "Sue Compelling" wrote: 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 -- Sue Compelling |
#4
|
|||
|
|||
Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to
DLookUp and merrily put ' ' all over the place ............ -- Sue Compelling "Ofer" wrote: 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" wrote: 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 -- Sue Compelling |
#5
|
|||
|
|||
Happy to help, have a nice weekend
"Sue Compelling" wrote: Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to DLookUp and merrily put ' ' all over the place ............ -- Sue Compelling "Ofer" wrote: 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" wrote: 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 -- Sue Compelling |
#6
|
|||
|
|||
If you still there, then using a dlookup with date it should be a follow
=DLookUp("[MonthName]","MonthsoftheYear","Date = #" & [Date] & "#") "Sue Compelling" wrote: Brilliant - thanks 'Ofer' - that did the trick ................ I'm new to DLookUp and merrily put ' ' all over the place ............ -- Sue Compelling "Ofer" wrote: 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" wrote: 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 -- Sue Compelling |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do i change 15 months to read 1 year and 3 months? | Marty | General Discussion | 1 | February 17th, 2005 11:21 PM |
report with totals for last sizx months and average | Rick Kane via AccessMonster.com | Setting Up & Running Reports | 4 | October 26th, 2004 10:31 PM |
Fiscal Year Calculations | Loretta | Worksheet Functions | 5 | August 19th, 2004 09:05 PM |
Monthly Average Previous 12 Months | rjm65 | Worksheet Functions | 2 | July 16th, 2004 12:06 AM |
formula for averaging months | John Sullivan | Worksheet Functions | 1 | November 4th, 2003 09:18 PM |