Results 1 to 8 of 8
  1. #1
    bruegel is offline Advanced Beginner
    Windows 10 Access 2003
    Join Date
    Jul 2012
    Location
    London
    Posts
    40

    Box for going to page number on opening report

    I have a report which contains basic client info (one client per page) taken from a simple query. Is there a simple way, when report is opened that the page number can be entered into a box which takes me to that page of the report please?



    Thanks

    Pieter

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    None that I can find.

    If you want to output a specific record then why not apply filter criteria?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    bruegel is offline Advanced Beginner
    Windows 10 Access 2003
    Join Date
    Jul 2012
    Location
    London
    Posts
    40
    It's a report with a lot of info. I can hide a lot by making sensitive fields invisible. I want an intern to check basic info so he can call clients, summon up page from a C&P Table to find page no. and enter just the number. No data entry. I wanted it to be simple enough for completely unskilled access. I couldn't find a way to select from page field and couldn't think of a way to use ID No or another number field I created in client table. I'm weak on VB so thought I could easily be missing something.

    Apart from that I thought it might be an interesting problem. (I also use Access 365 but link with other programmes e.g. accounts that haven't updated their ODBC driers so keep having to go back to 2003).

    Pieter

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    How would a value from C&P Table relate to page number of report?

    Again, apply filter from report. User selects client from combobox. Code opens report.

    DoCmd.OpenReport "report name", , , "ClientID=" & Me.cbxClient


    Advise no spaces nor punctuation/special characters (underscore only exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It's a report with a lot of info. I can hide a lot by making sensitive fields invisible. I want an intern to check basic info so he can call clients, summon up page from a C&P Table to find page no. and enter just the number. No data entry.
    Makes more sense (to me) to use a form instead of a report.

    Use the same "simple query" but don't put the sensitive data on the form.
    Each control can be set to "Locked = TRUE" and "Enabled = False" to keep the data from being changed.
    Set "Allow Deletes = False".

    Can use an unbound combo box in the form header to select the client record or filter the form to just that one client.


    Just sayin.....

  6. #6
    Beetle is offline Unrelatable
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    Camp Swampy (Denver, CO)
    Posts
    207
    Assuming that this is a static report and you always know ahead of time which page of the report the data you want is going to be on, then you could do this but you would still need to start from a form. For example, you have some form where the user enters the desired page number into a text box, then clicks a button to print the report, the code for the button would look like;

    Code:
    Dim vPage
    
    vPage = Me.txtPageNumber
    
    
    DoCmd.OpenReport "rptYourReport", acViewPreview
    DoCmd.PrintOut acPages, vPage, vPage, , 1
    DoCmd.Close acReport, "rptYourReport"
    This would open the report in preview mode momentarily, print the desired page, then close the report.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Perhaps another alternative is to 'mock up a TOC' on a report with hyperlinks to different sections. (not tested)
    Then save as PDF.
    The PDF would then allow you to go straight to a selected page from the TOC

    Alternatively Daniel Pineault has code for opening a PDF at a specific page: https://www.devhut.net/2013/12/04/vb...specific-page/
    I've used this code & it works well
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    bruegel is offline Advanced Beginner
    Windows 10 Access 2003
    Join Date
    Jul 2012
    Location
    London
    Posts
    40
    Thanks for all the suggestions. Lots to try and think about. Will mark as resolved and if solutions bring more questions I'll raise as separate issue.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. fixing number of records per page in a report
    By sanbhau in forum Programming
    Replies: 1
    Last Post: 05-25-2016, 11:41 AM
  2. Replies: 5
    Last Post: 06-01-2012, 03:59 PM
  3. Replies: 8
    Last Post: 08-12-2011, 11:55 AM
  4. Replies: 1
    Last Post: 03-19-2010, 05:17 PM
  5. Replies: 1
    Last Post: 03-12-2009, 09:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums