Sponsor for PC Pals Forum

Author Topic: vb..object closed!  (Read 1518 times)

Offline davypipes

  • Regular Member
  • **
  • Posts: 31
vb..object closed!
« on: March 04, 2005, 14:21 »
am getting this error everytime i cancell any update i do in my form:

error "3704"
"operation not allowed when object is closed"

heres the code snippet:

Private Sub cmdcancel_Click()
'dataenv is my dataenvironment connected to a access dbse  
With dataenv.rssale
.CancelUpdate

End With
End Sub
any ideas on wats wrong?

and another thing...emmm..is it a good idea to trap error numbers and use them for validation? eg:
     errornum=Err.number
     if errornum=1234567 then
     msgbox(please enter all required values)
     end if

will a different number be generated on a different machine?hence not doing the validation ?

Offline Simon

  • Administrator
  • *****
  • Posts: 67120
  • First to score 7/7 in Quiz of The Week's News 2017
vb..object closed!
« Reply #1 on: March 05, 2005, 19:58 »
Sorry for the delay, Davy.  Hopefully someone will be able to help you with this soon.
Many thanks to all our members, who have made PC Pals such an outstanding success!   :thumb:

Offline davypipes

  • Regular Member
  • **
  • Posts: 31
vb..object closed!
« Reply #2 on: March 07, 2005, 08:11 »
oooh thanks simon...its wasnt that argent!! anyway i was able(with my friends help!) to get the root of the problem!! u see i had called the wrong
table ie:
With dataenv.rssale
 'should have benn..
With dataenv.rsprofiles
...so theres the bugga, but about the error number...well i still havenmt gotten any info on the adv/disdvantages of using them.


Show unread posts since last visit.
Sponsor for PC Pals Forum