Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Posts
    2

    Unanswered: Report-sub report printing problem

    I have a form to add a new record with a subform set for data entry. It works fine with the subform showing only the single new record for adding.

    I have created a report with the same form and subform, but all the records print in the subform. I cannot set it to data entry to limit it to a single record the way I did the form because it will not show at all. How can I print a report with just the new added record? Any help will be greatly appreciated. Thanks

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You'll most likely need to put in some sort of criteria to identify the new record added (ie. perhaps a date field = today's date, a number if you're keeping track of numbers, or write code/design a query which retrieves the last record entered.

    I might do it with a query and simply set it up so it retrieves the last value of one of the fields (ie. select the summing button and change the "row" field to LAST (with also criteria to get the correct ID field.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Thanks for the reply. I am still trying different code as you suggest, but no luck so far. If I set the quary used for the form to last record, the subform on both the form and report do not show at all. I have been trying code for the command button that opens the report "on open" to try to get only the last record to show, but no luck so far. I'll keep trying.

    Thanks

Posting Permissions

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