Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    Getting Duplicate Record?
    A2k (9.0.3821) SR-1

    I have the following sub in a report event; report works fine however I

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    Try wrapping your operation in this:

    If FormatCount = 1 Then
    ... etc
    End If

    Otherwise, it will execute at least twice.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    Hi Charlotte

    Thanks for FormatCount

    Your solution is getting me closer

    I should be getting 103 records in tblSumServe2, I

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    Not a clue. Like Hans, I don't see why you're doing it this way in the first place though. It seems that there are more straightforward ways to populate your table.
    Charlotte

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

    Re: Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    John,

    Depending on what information your report displays, Access may have to format every section more than once. For instance, if you refer to the total number of pages in your report, Access will run through the report twice, first to count the number of pages, the second time to create the definitive layout. You may have better luck with the OnPrint event (and PrintCount instead of FormatCount).

    But why do you want to do this from an event of the Detail section? Executing a separate update query for each record seems inefficient. Can't you create an append query based on the record source of the report, with the same WHERE condition if necessary, and execute this query after displaying/printing the report?

    Regards,
    Hans

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting Duplicate Record? (A2k (9.0.3821) SR-1)

    Thanks Hans and Charlotte

    I'm was just prototyping this app, your suggestion was where I wanted to eventually wanted to go, bit the bullet and went, things seem to be working, Your approach gives the operator the chance to verify the checks were printed OK, before continuing with system.

    John

Posting Permissions

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