Displaying last months name

Esjaye

Registered User.
Local time
Today, 23:04
Joined
Aug 1, 2018
Messages
22
ok, you were all amazing helping last time so hopefully it will happen again.

I have a report that shows all of the orders that happened last month.

I want a label/text box/something to say orders for _____ and the month to automatically appear .... how do i do it please?

huge amount of thanks xx
 
How do you open report filtered for last month records?
 
There are many ways to do it.
In the ControlSource of a textbox:
Code:
= "Orders for " & MonthName(Month(Date()) MOD 12 + 11)
This one is based on simple arithmetic compared to manipulating dates or using Format.
 
thank you galaxiom - love you guys xx

and june - i based the report on query that had Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0)

on the criteria .... not sure if its the best way to do it but hey it works
 
There are many ways to do it.
In the ControlSource of a textbox:
Code:
= "Orders for " & MonthName(Month(Date()) MOD 12 + 11)
This one is based on simple arithmetic compared to manipulating dates or using Format.

im clearly doing something wrong because i get #Func! when i do this. HELP .... sorry for being thick
 
im clearly doing something wrong because i get #Func! when i do this. HELP .... sorry for being thick

No it's my mistake. Something went wrong between what I had working and what I posted. Just can't see what just now.
 
who knew trying to put a damn title on report was so bloody complicated!

Please let me know when you work it out. Thank you so much
 
Back to basics:
Code:
MonthName(Month(DateAdd("m", -1, Date())))

My mistake earlier was because I tested for January and December, thinking that would cover it, but it didn't.
 

Users who are viewing this thread

Back
Top Bottom