Refresh buffers?

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
 
PTuffillAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sudhi022299Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PTuffillAuthor Commented:
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
PTuffillAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.