Results 1 to 14 of 14
  1. #1
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    syncronize

    How do you syncronize record numbers with report numbers so thet match record 1 report 1.

  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
    I don't think it's clear what you're trying to achieve. Normally you would have one report to view any record, not a report for each record. Can you clarify your setup?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    syncronize cont

    Paul, maybe Im just being to detailed but I have added 2 screen shots. one is the record 3 and the other is report 1. How can I get them to be record 1 and report 1. When Im looking at record 3 and open reports its shows report 1 with the data from record 3.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The screen shots didn't make it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    sync cont

    Attachment 1038

    Attachment 1039
    Im not sure this attachment thing is happening like this now.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The report appears to be on page 1, which would be expected for whatever record(s) it was displaying. It appears the report has been restricted to that particular record, which is actually what I would expect. Is that not what you want?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    sync

    Shouldnt it be that when you open forms and see record #1 then open reports it should show report 1 as well? Not report 3.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How are you opening the report? If it's with that button in the first image, what's the code behind the button?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    sync cont

    I go to the objects menu and double click on repaorts. If I use the command button I put on the form then the code is this.

    Private Sub Command183_Click()
    On Error GoTo Err_Command183_Click
    Dim stDocName As String
    stDocName = "service report"
    DoCmd.OpenReport stDocName, acPreview
    Exit_Command183_Click:
    Exit Sub
    Err_Command183_Click:
    MsgBox Err.Description
    Resume Exit_Command183_Click

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Opening with either of those methods the report will show whatever is in its record source. If that's the table, it will show all records in the table. You likely want this technique:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    sync cont

    Im really sorry but I dont quite get what you are saying could you possibly explain further?

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    If you want the report limited to the record that is displayed on the form, that technique is one way to do it. It uses the wherecondition argument of OpenReport, using a value from the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    nashr1928 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Apr 2010
    Posts
    146

    sync cont

    Yes this is exactly what I wish to do. So I guess Im going to have to do some trial and error to see if I can get this to work. Thanks.....

  14. #14
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The code from my site with the appropriate changes to the form, field and control names should work. You of course want OpenReport instead of OpenForm, but the wherecondition syntax is the same:

    DoCmd.OpenReport stDocName, acPreview, , "FieldName = ...

    with the appropriate syntax for the data type of your key field (the field that uniquely identifies the record you want).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

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