Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Selection Time Displayed (A2K)

    I have a report preview button which when clicked, looks up a query ( qry LookUp ) with the following columns and their associated selection criteria:

    InvoiceDate: Format([F11_Invoice_Date],"mm/dd/yy")
    [Enter Invoice Date: mm/dd/yy]

    RepairTime: Format([F05_UserDate],"hh:mm AMPM")
    >[Enter Time: HH:MM AMPM]

    All of the above works perfectly.

    What I've attempted, unsuccessfully, is to display the time that is entered in the RepairTime, so that the report would show something like:

    Report Requested @ [RepairTime]

    So far, so bad.

    Thanks in advance for any help on this.
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Selection Time Displayed (A2K)

    Create a text box on the report with control source
    <code>
    ="Report Requested @ " & [Repair Time]
    </code>
    Give this text box a name like txtRequested or something like that. Do *not* name it Repair Time for that would confuse Access.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selection Time Displayed (A2K)

    Sorry for the response delay, Hans.

    I cut and copied your example and when I enter 7:00 am for the greater than search criteria, the correct records are selected, but the RepairTime of the first record is displayed: 9:32 am instead of 7:00 am the search criteria.

    I just hope that I explained my problem correctly.
    Cheers,
    Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Selection Time Displayed (A2K)

    Sorry, my mistake. Try
    <code>
    ="Report Requested @ " & [Enter Time: HH:MM AMPM]</code>

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selection Time Displayed (A2K)

    Hans,

    Tried: ="Report Requested @ " & [Enter Time: HH:MM AMPM] ( this was cut and pastted directly from my code ) and I got #Error and no data was displayed.

    I'm trying to understand how the system would know that the above is from the criteria line of the query where it's referring to [RepairTime]? Just dim I guess.
    Cheers,
    Andy

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Selection Time Displayed (A2K)

    Reports usually recognize parameters used in their record source.
    What name did you give the text box?
    What happens if you set the control source of the text box to

    Enter Time: HH:MM AMPM

    or to

    =[Enter Time: HH:MM AMPM]

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selection Time Displayed (A2K)

    Sorry about this, Hans, but I guess I wasn't too clear in my original question when I stated that:

    I have a report preview button which when clicked, looks up a query

    and that

    RepairTime: Format([F05_UserDate],"hh:mm AMPM")

    was a query column

    and

    >[Enter Time: HH:MM AMPM]

    is the criteria prompt which the user sees and then enters whatever time they wish.

    So, there is no text box to refer to.
    Cheers,
    Andy

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Selection Time Displayed (A2K)

    No, I understand that, but my earlier replies were based on exactly the situation that you describe. Have you tried the suggestions from my last reply?

  9. #9
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selection Time Displayed (A2K)

    Reports usually recognize parameters used in their record source.

    Ok. I grasp the above.

    What name did you give the text box?

    txtRequested

    What happens if you set the control source of the text box to

    Enter Time: HH:MM AMPM

    or to

    =[Enter Time: HH:MM AMPM]


    When I tried this with the existing text box with all of the above, I got #Error

    So, never trusting anything, I deleted the text box, created a new one with the above criteria,
    =[Enter Time: HH:MM AMPM]

    And it worked!

    This is just a wild guess, but I've been cutting and pasting out of a MS Word document that I keep open just for that purpose, and it makes me wonder if there could be a problem in doing that.

    OK, I'm grasping at straws.

    Thanks kindly for your patience, Hans, I'll try not to badger you again today,
    Cheers,
    Andy

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Selection Time Displayed (A2K)

    Next, create a new text box on the report and set its Control Source to

    ="Report Requested @ " & [Enter Time: HH:MM AMPM]

    Hopefully it'll work this time <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  11. #11
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selection Time Displayed (A2K)

    Thanks Hans,

    Here's my grand finale:

    ="Requested @ " & [Enter Time: HH:MM AMPM] & " on " & (Format([F11_Invoice_Date],"dddd, mmm dd yyyy"))

    Which displays on the report as: Requested @ 8:45 am on Friday, May 30 2008

    All are now happy campers - - for the moment.
    Cheers,
    Andy

Posting Permissions

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