?
Solved

Refresh buffers?

Posted on 2000-01-18
3
Medium Priority
?
180 Views
Last Modified: 2010-05-18
Hi, I am an experienced programmer but new to VB.
This is my first major project done on a learn as you go basis! But I have
got stuck.
The project comprises a VB6 front end to a ACCESS97 (Jet) databse.
I need to create a report from the result of a user query. I couldn't
figure how to get SQL parameters to work within the VB report writer so I have done it in two parts.
1. Get user input to build SQL to first empty then insert required records into a table(special table for the purpose)
2. Envoke report to read table and print.

> Ha ha does it work!!?? NO The data reported is always that which was
present at program start time and will not refresh during runtime, despite
trying resync and refresh in various places.  The only progress I have made is by forcing Data Environment close in the report terminate proc, I then get the new data after TWO attemps of running the report.  This is consistant!(always two times)  The report is a databound report using a DE. The SQL that creates the new data is code in a proc.
 
 Any suggestions ?? Many thanks...... Phil
 
0
Comment
Question by:PTuffill
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
sudhi022299 earned 150 total points
ID: 2364417
Try this:
MyDataEnvironment.rsMyRecordset.Requery
 Set rptMyReport.DataSource = MyDataEnvironment

You have wait for a second or two .

Check this one too:

http://support.microsoft.com/support/kb/articles/q191/4/57.asp 

Regards,
Sudhi.
0
 

Author Comment

by:PTuffill
ID: 2394093
Helpful response but I am still having difficulties but I think they may involve the installation itself!  I upgraded to SP3 & have had trouble ever since.
Thanks for a great service.
I will be back!
0
 

Author Comment

by:PTuffill
ID: 2394096
Helpful response but I am still having difficulties but I think they may involve the installation itself!  I upgraded to SP3 & have had trouble ever since.
Thanks for a great service.
I will be back!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question