944,103 Members | Top Members by Rank

Ad:
Oct 26th, 2009
0

run time error 3705

Expand Post »
I select a month from a combobox and type the year in maskeditbox then press a button to show the report. 1st the report show. when I select another month to show again the report then show a error msg:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. run-time error 3705
  2. operation is not allowed when the object is open
and then highlight the connection string.
Similar Threads
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Oct 26th, 2009
0
Re: run time error 3705
First close your recordset. Re-open the recordset with the new date criteria and then refresh the grid.

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. RS.close
  2. RS.Open "......................."
  3.  
  4. Grd.Refresh

Hope this helps Abu
Reputation Points: 329
Solved Threads: 347
Senior Poster
AndreRet is offline Offline
3,700 posts
since Jan 2008
Oct 27th, 2009
0
Re: run time error 3705
I write code in the button
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub cmdshow_Click()
  2. Dim str As String
  3. str = "01/" & cmbMonth.ListIndex + 1 & "/" & MaskEdBox1.Text
  4. dt = Format(str, "DD/MM/YYYY")
  5.  
  6. If isLoad = True Then
  7. Unload dr1
  8. Unload DataEnvironment1
  9. Else
  10. isLoad = True
  11. End If
  12.  
  13.  
  14. DataEnvironment1.cmdmonth (dt)
  15. Unload Me
  16. Load dr1
  17. dr1.Show
in dataenvironment>command> I write code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Select * from main
  2. Where Month(Date)=Month(dt)
  3. And Year(Date)=Year(dt)
  4. Order by Date Asc
and the I connect the database in dataenvironment manually.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Oct 27th, 2009
0
Re: run time error 3705
I just change it and now it is ok.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. If isLoad = false Then Unload dr1 Unload DataEnvironment1 Else isLoad = True End If
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB6 Resident monitor
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: need help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC