hidden events

Rhoarke
09-06-2000, 06:56 PM
Ok. New q. I just got back in the swing of things, so that's why the two b2b posts. One solution (the other one) and one q: (this one!!). I have the following code in a project that keeps bugging out. I'll comment more after...


Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
AddRecord_Click
text1(2).text="depress"
isSaved = True
End Sub


Private Sub AddRecord_Click()
Dim temptext As Integer
If Not isSaved Then savedcheck
If Rs.RecordCount > 0 Then
Rs.MoveLast '*****error comes here****
temptext = Infodisplay.text1(0)
End If
With Rs
.AddNew
.Fields.Item("date") = Date
'.Fields.Item("event") = ""
.Fields.Item("time") = Time
Infodisplay.text1(0) = temptext + 1
isSaved = False
End With
populateCBO
Rs.MoveLast
End Sub

Now, the code as/is above gives me an error on line ** the SECOND time the mousedown_click is called. If I take out the
---text1(2).text="depress"----
line, then I get no errors. Additionally, if I leave said line out and manually TYPE in the word "depress" (or anything else) I get no errors. What event is not firing when the .text is entered with code that IS fired when I type (or vice versa)???? ARGGGH. If anybody can help with this, lemme know!! Thx in advance.
-r

BillSoo
09-06-2000, 07:34 PM
First, a couple of questions:
1) what is the error message you get?
2) is this an ADO or DAO database?

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

Rhoarke
09-07-2000, 09:47 AM
Ummmm... first, sorry to leave out the error info. It's a Run-time error..."the change was canceled during notification; no columns are changed." and I'm using ADO.

Now. This morning, I ran the program (after reboot) and the whole deal crashed (hung windows and all). After reboot, my app works fine. ??????!!!! What the hell? I didn't change a thing. Maybe some VB problem referencing an ADO lib? who knows. Well, at least I'm not crazy. My code was fine, but something ELSE was screwy. Hate to think I lost so much time on it...so goes coding, eh? Thx for the reply anyway. Guess there aren't any "hidden events" after all. :)
-r

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum