Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    46

    Unanswered: using one button, open a different report based on a selection in a field.

    Using a button on a form I open a report showing a Transaction summary with all details on.

    What I want to do is to open different reports based on different criteria as selected in the original form.

    For example, at the moment if the selection in a drop down field is "Not paid" then the report shows this as "Account status: Not Paid"

    What I want to do is to make it more personal and add a paragraph saying something about how to pay.

    Obviously if someone has "paid" I wouldnt want this parapgraph in. But I would want this in the to be generated by pressing only the one button.

    The current button code is as follows:

    Private Sub Command67_Click()

    Dim strReportName As String
    Dim strCriteria As String

    strReportName = "dadcheck® Transaction Summary"
    strCriteria = "[Case_number]=" & Me![Case_number]
    DoCmd.OpenReport strReportName, acViewPreview, , strCriteria

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    What have you tried so far?

    What you are trying to achieve is fairly straight forward. AS a hint look to place some code in the detail foramt event that tests if a payment has been made. Based on that test set some text in an unbound text box control in the report.

    Have a try, and if you still have problems come back again.

  3. #3
    Join Date
    Dec 2004
    Posts
    46
    Hi

    I dont have any real idea of advanced coding so I wouldnt know even where to start!!!!

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Its not advanced coding...
    You have a hint of what to do, go try...

    If it fails then come back, but at least make an effort. That way you will start to learn what Access can do. It is always alledged that it is better to learn by making mistakes than have it handed on a plate.

    What have you to loose, just try it...

  5. #5
    Join Date
    Dec 2004
    Posts
    277
    yea but when you are hungry and got no legs it is soooo much easier to get served

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •