Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Data Report (VB6 sp5)

    I have an application that i am developing which needs to report to the user about the contents of an access database. To this point i have created a data environment (DE) and a data report (DR) in VB and associated the report to a command in the DE.

    The report shows succesfully when a user click a command button (DRname.show). The problem comes from running the report a second time during the same application session (ie the application has not been shut down). If the user requests the report a 2nd (3rd,4th...) time the data is unchanged on the report. The database has however accepted updates in the intervening time.
    I have tried DR.Refresh in the commandbutton_click event (and other places) but nothing will encourage the report to show up to date data unless it is run the 1st time after a restart of the application.

    i have also tried forcing a refresh on the command and the DE but they have no effect or produce an error.

    can anyone shed any light on this please?

    MS dont give any clues and their example of a vb project with a data report in it displays the same characteristics.
    http://support.microsoft.com/default.aspx?...;Q240019&VOTE=1
    http://support.microsoft.com/default.aspx?...b;EN-GB;q289793

    TIA

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Data Report (VB6 sp5)

    Never done DE/DR, but from a quick search I found this code. Looks like it might be applicable. Hope so! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    New Lounger
    Join Date
    May 2002
    Location
    CT, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Data Report (VB6 sp5)-MULTI-Re: Data Report (V

    Fr. Jack,

    I had the same problem only with the display on a form as opposed to a report; I found the answer in Helen Feddema's book and the fact that it was so simple knocked my socks off! If you don't receive a solution by Tuesday morning, I'll send you mine. I can't send it now because both the book and my databases are at the office!

    Peace,
    Peter (Also Known As Kroke)

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Data Report (VB6 sp5)

    Sam,
    Thanks for this (so far !)
    How do i go about closing the report and the data connection in code (set temprs=nothing etc )? should it be in the function or in the calling form ?

    looking good though, thanks again

  5. #5
    New Lounger
    Join Date
    May 2002
    Location
    CT, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Me![List24].Requery

    The significent statement: Me![list].Requery

    Exit_Commence_Table_Refresh_Click:
    Exit Sub

    Err_Commence_Table_Refresh_Click:
    If (Err = ERR_OBJNOTEXIST) Or (Err = ERR_OBJNOTSET) Then
    Resume Next
    End If
    MsgBox Err.Description
    Resume Exit_Commence_Table_Refresh_Click


    End Sub

Posting Permissions

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