Results 1 to 5 of 5
  1. #1
    jonas767 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2015
    Posts
    3

    Exclamation [HELP] Microsoft Access Database 2007

    please somebody help me with my thesis just one question


    i need to print preview a selected data from a form but everytime i previewed it will show only a first data in the table
    what should i do? please help me i am new with this programming and software
    Click image for larger version. 

Name:	1.jpg 
Views:	7 
Size:	169.9 KB 
ID:	21000

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sounds like a situation for:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    jonas767 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2015
    Posts
    3
    Quote Originally Posted by pbaldy View Post
    Sounds like a situation for:

    http://www.baldyweb.com/wherecondition.htm
    sir do i have to create a query or no?

  4. #4
    jonas767 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2015
    Posts
    3
    Quote Originally Posted by pbaldy View Post
    Sounds like a situation for:

    http://www.baldyweb.com/wherecondition.htm

    sir i use this command but it cannot show a record in the report

    How To Print A Single Record from a Microsoft Access Form into a Report

    You may, at times, wish to only print the record that you are currently displaying in your Microsoft Access form. This can be done directly from the Form's File » Print Option and choosing Print Range » Selected Record(s).
    However, forms are not really optimized to print out records and you may wish to present your data in a more user friendly approach.
    Question » From a command button on my form, is it possible to print a report of only the current record?
    Answer » Yes, You will need to define a WHERE clause in the DoCmd.OpenReport method
    Syntax:
    DoCmd.OpenReport reportname [, view][, filtername][, wherecondition]
    For Example:
    DoCmd.OpenReport "rptEmployeeDetails", acViewPreview, , _
    "[lngEmpID]=Forms!frmEmployeeThe first section DoCmd. OpenReport "rptEmployeeDetails",acViewPreview can be broken down as:
    DoCmd.OpenReport is opening the report - "rptEmployeeDetails".
    acViewPreview is opening the report in Print Preview mode.
    The last section enclosed in the double quotes is the criteria which can be broken down as:
    [lngEmpID] is the name on the unique fieldname of the record that identifies the record you want to print - it could be the Primary Key.
    Forms!frmEmployeeDetails !lngEmpID is the place where the value of lngEmpID is to be found. In this case, On a form called 'frmEmployeeDetails' in a control called 'lngEmpID'
    This method assumes that the record has already been selected on a form prior to printing. The Report name here is "rptEmployeeDetails".

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You don't need a query for the report. Can you post your db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Microsoft Access 2007 help!
    By FloydPalmer in forum Access
    Replies: 3
    Last Post: 02-24-2015, 10:39 AM
  2. Microsoft access 2007
    By nhkosaric in forum Access
    Replies: 1
    Last Post: 01-06-2015, 05:37 PM
  3. Replies: 2
    Last Post: 02-06-2013, 12:55 AM
  4. Replies: 2
    Last Post: 07-29-2011, 11:43 AM
  5. Replies: 3
    Last Post: 06-22-2010, 07:49 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