Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
I want to create a formula in a listbox to select the previous month.
In another QV document, I do the following in the SEARCH field for the OnDate listbox:
=OnDate=FirstWorkDate(today()-1,1) , and this works fine - it returns the previous work day. I save it as a bookmark "Yesterday",
and use that to select the report parameters when I send it through nPrinting.
Now, I want to get the previous month from "ActMonth", so I tried:
=ActMonth=AddMonths(today(),-1,1) <- doesn't work, returns all months
=ActMonth=Month(today())-1 <- doesn't work, returns all months
Created a variable: Date(today(),'MM/DD/YYYY') which matches our script's date format. Tried
=ActMonth=Month($(vToday))-1 <- doesn't work, returns all months
=ActMonth=Month(vToday)-1 <- doesn't work, returns all months
This has to be dirt simple, but I can't figure out why it's not working.
Can anyone assist?
Thanks
 madsgrathe
		
			madsgrathe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I have this exact same problem.
HOWEVER: I can get the listbox search to work when there is no selection already made. But if selections are made prior to the listbox search, the search formula won't work...
Is this a bug?
 
					
				
		
 rustyfishbones
		
			rustyfishbones
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
try
=MONTH(AddMonths(today(),-1))
