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

    Question Unanswered: Showing specific records BUT based on TWO fields

    I had already asked a similar question to this and now was wondering if there is any way to show a specific record (to be the output on a report) based on two fields.

    This is the code I have for outputting a specific record based on the ID number -

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

    I would like to also show not only the specific ID but date as well. Any suggestions?

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

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    Have the query, that the report is based on, reference you forms directly (not pass through with the opening of the report)

    In the criteria portion of you query for patientID enter:
    [Forms]![frmAppointments]![PatientID]
    In the criteria portion of your query for Date Enter:
    [Forms]![frmAppointments]![txtDate] ' or what ever the textbox name is


    S-

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    "[PatientID]=[Forms]![frmAppointments]![PatientID] and [Forms]![frmAppointments]![BeginDate]<=[DateFieldName]<=[Forms]![frmAppointments]![EndDate]"

  4. #4
    Join Date
    Feb 2004
    Location
    Barbados
    Posts
    50
    thanks it's working now
    "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
  •