Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report issues (2K)

    Hi,

    I have a rather one dimensional database that I have attached.
    Basically my main concern is TblJPMMain. This is a single table that records all the data I need. The remainding tables are purely look up tables for combo boxes.

    From TblJPMMain I don't need any additional tables to link as none of the data needs a One to Many relationship or anything like that.
    However when I go to produce reports the data is duplicated tenfold. I suspect a major design flaw.

  2. #2
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report issues (2K)

    QryResults has several extra tables shown which are not related to tblJPMMain. This causes Access to create a Cartesian product (each record with every other record). If you had two tables, one with 10 records and one with 5 records, a query with a Cartesian product would return 50 records.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  3. #3
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report issues (2K)

    Thanks for that Steve. That's duly resolved my issue.
    On a side note do you know how to mail 2 reports in one email. Currently I have a control with the following code:

    Private Sub CmdMailReports_Click()
    On Error GoTo Err_CmdMailReports_Click

    Dim stDocName As String
    Dim stDocName2 As String

    stDocName = "RptFileQuality"
    stDocName2 = "RptGlobalStatistics"
    DoCmd.SendObject acReport, stDocName And stDocName2

    Exit_CmdMailReports_Click:
    Exit Sub

    Err_CmdMailReports_Click:
    MsgBox Err.Description
    Resume Exit_CmdMailReports_Click

    End Sub

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report issues (2K)

    DoCmd.SendObject can only be used to attach one database object at a time. If you want to send multiple items, you'll have to save them to files on disk first, then use Automation to control Outlook from Access and attach the saved files.
    If you search this forum for Attachments.Add, you'll find examples.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report issues (2K)

    Thanks Hans, will do.

Posting Permissions

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