Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help me with this tiny bit of DataEnvironment code pls :)

Status
Not open for further replies.

oka97

Programmer
May 25, 2003
28
0
0
GB
==
If DataEnvironment4.Connection1.State <> 0 Then DataEnvironment4.Connection1.Close
DataEnvironment4.Connection1.Open
DataEnvironment4.Commands(&quot;Command1&quot;).CommandText = TempQuery
rptSummary.Show vbModal
==

It'll only show once, after you close the report rptSummary, only blank reports come up after.
 
Try this:

If DataEnvironment4.Connection1.State <> 0 Then DataEnvironment4.Connection1.Close
DoEvents
DataEnvironment4.Connection1.Open

I've found that the Connection needs a chance to Close before re-opening


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top