Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Barbados
    Posts
    50

    Unanswered: previewing specific records in a report

    Hi,

    I have a form which contains records about patients. the primiary is PatientID and is based on the national ID number.

    I have compiled a query to show the patient's bill (invoice). from this query I have created a report. i have placed a button on the same form mentioned above that will open the report. right now the button opens the report and all the records are showing.

    i would like it that when the user goes to a particular record in the form, the user can click on the button to preview just that record's bill and no others.

    i'm using access 2000.

    bajanElf
    "The extreme always make an impression." - Jeff Hardy

  2. #2
    Join Date
    Feb 2004
    Location
    Barbados
    Posts
    50
    i should also mention i was told that i could "fix" the query in sql, but i'm not to sure how to do that.
    "The extreme always make an impression." - Jeff Hardy

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Originally posted by bajan_elf
    i should also mention i was told that i could "fix" the query in sql, but i'm not to sure how to do that.
    The simplest answer is to build a criteria that restricts the query to just the data for a particular employee or bill. Without knowing a good bit more about your application, I can't really give you any specifics. The basic process isn't tough, you just add a criteria in the query form where client_number = x or where bill_id = y.

    -PatP

  4. #4
    Join Date
    Feb 2004
    Location
    Barbados
    Posts
    50
    hmmm... no worries Pat. i got it working. it seems i needed a piece of code inthe command button the opens the report. below is what i added.

    DoCmd.OpenReport stDocName, acPreview, "", "[PatientID]=[Forms]![frmAppointments]![PatientID]"

    so in fact i didn't really need sql. thanks for taking the time to look at my post anyway tho, it was greatly appreciated.

    bajan elf
    "The extreme always make an impression." - Jeff Hardy

Posting Permissions

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