View Single Post
  #3  
Old May 4th, 2010, 11:20 PM posted to microsoft.public.access.forms
AccessKay via AccessMonster.com
external usenet poster
 
Posts: 22
Default Allen Browne’s date range vb a for more reports

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