Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2005
    Posts
    87

    Unanswered: Print Preview for Current Form only

    Hello, i have a question.I set my form to DataEntry = Yes, and i can see fresh form everytime i open it.But if i press printpreview button (i created it myself) then i see all records that were previously made aswell...

    How to see print preview for current open form only?

    P.S.This open form can have couple records filled, so i need to see them aswell.

    Thank you

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What does your "printpreview" button do exactly?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    ok, there's an "understanding" problem here.

    The Data Entry property doesn't mean that all the rest of the records aren't there. Data Entry means:
    Quote Originally Posted by Access Help File
    to specify whether a bound form opens to allow data entry only. The Data Entry property doesn't determine whether records can be added; it only determines whether existing records are displayed.
    Check the help file - there is more useful info there

    What you are asking for is a FILTER - you want to preview the form and see the CURRENT RECORD ONLY. There are several ways to accomplish this. The best method (,my opinion, anyway) would be to add a filter to the form and turn the filter on right before previewing. This can be done in code like so:
    Code:
    ... see help file for FILTER and FILTERON properties
    have fun!

    Todd S.
    click to email


    Independent Development Consultant
    Biz db & reports - SQL, Access, Crystal, Seradex and more
    Small, custom, unique programs - Office, VBA, .NET


    _________________________________________________
    Favorite message from Windows:
    There was an error displaying the previous error message

    Sadly, there was no error number to look up ...

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by tcace
    .....Check the help file - there is more useful info there.....
    Hey now come on, next you will be expecting people asking questions on this forums to think about, or even analyse, the problem before they post here......

  5. #5
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Quote Originally Posted by healdem
    Hey now come on, next you will be expecting people asking questions on this forums to think about, or even analyse, the problem before they post here......
    Hahaha, heaven forbid they should do that. Good one healdem...

  6. #6
    Join Date
    Oct 2005
    Posts
    87
    Quote Originally Posted by tcace
    ok, there's an "understanding" problem here.

    The Data Entry property doesn't mean that all the rest of the records aren't there. Data Entry means:Check the help file - there is more useful info there

    What you are asking for is a FILTER - you want to preview the form and see the CURRENT RECORD ONLY. There are several ways to accomplish this. The best method (,my opinion, anyway) would be to add a filter to the form and turn the filter on right before previewing. This can be done in code like so:
    Code:
    ... see help file for FILTER and FILTERON properties
    Current record or current records?

    Because i want to print couple records (like a couple of sheets) ,everything in one print-report.

  7. #7
    Join Date
    Oct 2005
    Posts
    87
    Quote Originally Posted by Teddy
    What does your "printpreview" button do exactly?

    "Private Sub Command248_Click()
    On Error GoTo Err_Command248_Click

    Dim stDocName As String

    stDocName = "reportname"
    DoCmd.OpenReport stDocName, acPreview

    Exit_Command248_Click:
    Exit Sub

    Err_Command248_Click:
    MsgBox Err.Description
    Resume Exit_Command248_Click

    End Sub"

  8. #8
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Lookup the OpenReport action in the help file - there are a number of additional properties the wizard doesn't give you when creating a command button.

    Included in these properties is a filter that gets applied to the report when it opens. If you use an unbound text box that has a defulat value of =Now() and add a Date/Time field to your table that has the same default, your filter can be
    Code:
    "[Datefield] > #" & Format(Me.txtUnboundDate) & "#"
    That will limit your report to the records added after the form was opened.
    have fun!

    Todd S.
    click to email


    Independent Development Consultant
    Biz db & reports - SQL, Access, Crystal, Seradex and more
    Small, custom, unique programs - Office, VBA, .NET


    _________________________________________________
    Favorite message from Windows:
    There was an error displaying the previous error message

    Sadly, there was no error number to look up ...

Posting Permissions

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