View Single Post
  #4  
Old May 5th, 2010, 02:35 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Allen Browne’s date range vb a for more reports

That's great news. Well done.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"AccessKay via AccessMonster.com" u59222@uwe wrote in message
news:a78523543c945@uwe...
Hi Allen,

Thank you very much! This is exactly what I needed. It’s so professional
and user friendly. I plan to use it many times in the future. I
appreciate
your help and I also wanted to thank you for your fantastic website. If I
can follow your clear and concise instructions, anyone can. Good job!

Kay


Allen Browne wrote:
You can get a good result by combining:
- an option group for selecting the report
- text boxes for the limiting dates
- a command button to open the report.

Given the code in Method 2 at:
http://allenbrowne.com/casu-08.html
you choose the lines:
strReport = "rptSales" 'Put your report name in these quotes.
strDateField = "[SaleDate]" 'Put your field name in the square
brackets
in these quotes.
with something like the following:

Select Case Me.Frame99.Value
Case 1
strReport = "Report1"
strDateField = "[InvoiceDate]"
Case 3
strReport = "SomeOtherReport"
strDateField = "[AppointmentDate]"
Case 3
strReport = "Report9"
strDateField = "[EventDate]"
Case Else
MsgBox "I don't know what to do with option " & Me.Frame99.Value
End Select

The error handler part can stay as it is.

I created an unbound form and used Allen Browne’s vba for “Limiting
Report
to

[quoted text clipped - 48 lines]
Many thanks for any replies.
Kay


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1