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
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