+ Reply to Thread
Results 1 to 6 of 6

Selection to show in Report Page Header

  1. #1
    Registered User
    Join Date
    08-21-2008
    Location
    Gibraltar
    MS-Off Ver
    Excel 2007
    Posts
    53

    Selection to show in Report Page Header

    Hi ... I'm stumped again !

    What I want to do is to have the dates that have been inputted on a form, appear in the Report page header.

    The form is called Select_Inception. This form only has two text boxes called Start Date and End Date, they select on a field called PeriodFrom. There is also an OK button, this is the vba code I have used

    Please Login or Register  to view this content.
    I've added a text box in the page header of the report and in the control source i've tried this
    Please Login or Register  to view this content.
    But when I open the report I get #Name?

    I'm sure it's something daft I'm doing again.

    Cheers
    Wrightie
    Last edited by wrightie; 06-25-2009 at 11:12 AM.

  2. #2
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Selection to show in Report Page Header

    Well there are 2 ways to do it, the one I would use is using TempVars.

    On the form you enter the dates on make an ok key or something that when clicked does something like:

    Please Login or Register  to view this content.
    Then in the 2 text fields you enter the following in the control source: =[TempVars]![MaxBase] etc

    These are examples from my database. I use the discounts in the header of a report comparing pricing.

    If the form is still open when you open the report you can always use the "me."

    Hope this helps,

    Dan

    P.S. TempVars only works in Access 2007, (I see you have excel 2007 so assumed.)
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the "Star" and adding to my reputation, Thanks!

  3. #3
    Registered User
    Join Date
    08-21-2008
    Location
    Gibraltar
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Selection to show in Report Page Header

    Hi Dan ,

    We are on MS 2007 Basic, so for the time being still using Access 2003.
    However I will keep this info for when we get round to upgrading, so thanks for that.

    I don't suppose you have a 2003 option ?

    wrightie

  4. #4
    Registered User
    Join Date
    08-21-2008
    Location
    Gibraltar
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Selection to show in Report Page Header

    I've tried this and get the text "For the period of to" . No error message so it's a tad better !

    ="For the period of" & Forms!Select_Inception![Start Date] & " to" & Forms!Select_Inception![End Date]

  5. #5
    Registered User
    Join Date
    08-21-2008
    Location
    Gibraltar
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Selection to show in Report Page Header

    Yep it worked. This code was ok, i just hadn't placed any dates in the form hence why it was just bringing up only the text.

    ="For the period of" & Forms!Select_Inception![Start Date] & " to" & Forms!Select_Inception![End Date]

    Thanks yet again Dan for you help, I will remember the TempVars for when we upgrade to pro.

    Cheers
    wrightie

  6. #6
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Selection to show in Report Page Header

    Np, glad you figured it out.

    TempVars are a fantastic addition.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1