I want to select report sort critria from a from

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I inherited a project from someone who actually knew what they were doing
(unlike myself). While I've been a programmer for a long time, I have
generally avoided using Office products, having a preference for 'real'
programming languages. Anyway, I have a form containing a list of the
possible sort fields I want to produce a report for. I have the report
defined. I am not sure how/where to specify to the report that I want to use
the selected item from the form for the primary sort criterion. (I'm a quick
learner). Any help would be appreciated!
 
If you would take back the "real programming languages" comment, I might
help you.
Others might not be so offended... ;-)
 
I also think Access is too dummy proof.... So I am not offend and I think
your comments are right on.
my suggestion is to drop to code as soon as possible.

I would do the following:

1st dump on the record bars and filter bars that default on the form in
access...
Add a button to bring up the report.
On a click event of the button on the form.
1) Read the Form control values

2) build an sql string , Remember Dates are not ANSI compliant for SQL
calls
probably something like
if txtCust.text <> "" then ssql = ssql & " customer_code = '" &
txtCust..text & "'"
3) open the report with a
DoCmd.OpenReport repName, prev, , ssql
in the code on the click event.
 
Back
Top