|
-
Sep 27th, 2000, 05:04 AM
#1
Thread Starter
Junior Member
I am currently writing a VB application that uses a Data Environment linked to a table in Microsoft Access. I have based a report on this Data Environment, and when I display the report for the first time all is well, when I add infomation to the recordset that relates to the table in Access, and try to display the report again, the infomation is not updated in the Data Environment and I can't find out how to refresh it. Can anyone help me please ?
-
Sep 27th, 2000, 02:38 PM
#2
Addicted Member
Maybe your query does not suffice what your report should display. It should always be refreshed when you open it. Try closing it first then open it.
-
Sep 28th, 2000, 11:21 AM
#3
Lively Member
The query runs when the data environment is loaded so I always get around this problem by unloading the data environment in the query close event of the report. I don't know if there is a better way but this works!
-
Sep 29th, 2000, 08:03 AM
#4
Thread Starter
Junior Member
Thank you !
Thankyou very much, I was beginning to think there was no way to do it !!!
-
Jul 15th, 2001, 09:49 AM
#5
New Member
I also encountered the same problem, but i tried cancelling the query in the query close event, but still cannot work, is that how you unload a data environment in the query close event of the report? Please help...Thank u very much
-
Jul 15th, 2001, 08:02 PM
#6
Fanatic Member
Try this. I got it from one of the threads here...
'close the DE Command, then use the DR Refresh method
'add "rs" prefix to CommandName to identify it as a recordset
'ex.
Private Sub cmdButtonName_Click()
On Error Resume Next
If DE.rsCommandName.State = adStateOpen Then
DE.rsCommandName.Close
End If
dtrReportName.Refresh
dtrReportName.Show (vbModal)
Unload dtrReportName
End Sub
On Error GoTo Hell
Hell:
Kill Me
Food For Thought:
- Do not judge a book... if you're not a judge!

-
Jul 16th, 2001, 07:20 AM
#7
New Member
Eimroda, Thank YOU very much!!! It works perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|