Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
VBA Access Woes with report
Ok..have kicked the cat, bit the dog, smoked 2 pks of cigarettes and pulled my hair out trying to find the solution to this class assignment.
Here is the problem: wish to sort and view report using the input search criteria by user (1 string, 1 date). There are 3 areas to search for each date Ordered, Required or Promised. The out put is to be a report that only the records whose order date is X
Here is what I got so far.
Public Function PrintReport()
'assign variables and address to variable object
Dim strField As String, strDate As String, dtmDate As Date, rptOrdersReport As Report
DoCmd.OpenReport ("ordersreport"), acViewPreview
'set the open report as active
Set rptOrdersReport = Application.Reports("ordersreport")
'input from user
strField = InputBox(prompt:="What field do you wish to view: ", Default:="Ordered")
strDate = InputBox(prompt:="What date do wish to view: ", Default:=Date)
'search by variables input by user
????????????? instructor desires us to use the wherecondition, concatenation and # signs around the date input by the user.
I'm sure I am looking right at it but can't see the solution and it is driving me buggy.
Any help would be appreciated greatly.
0 · ·