run time error 3705

Thread Solved

Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training

run time error 3705

 
0
  #1
32 Days Ago
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.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 232
Reputation: AndreRet is an unknown quantity at this point 
Solved Threads: 32
AndreRet AndreRet is offline Offline
Posting Whiz in Training
 
0
  #2
31 Days Ago
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
Please mark questions as answered when done.

Be the ONE!!!
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training
 
0
  #3
31 Days Ago
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.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training
 
0
  #4
31 Days Ago
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
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC