S
Sue Compelling
Hi
I have the following code in my form, which works perfectly for another DB
but in my new DB, rather than going to the "txtNewText" field - using F5
causes me to jump to the 1st record in my DB and the set.focus to the
"cboSearch" field
Private Sub form_keydown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF5
txtNewText.SetFocus
End Select
End Sub
I have the following code on my cboSearch field (though cannot determine
whether anything is looping):
Private Sub cboSearch_AfterUpdate()
With Me.RecordsetClone
.FindFirst "ContactID = " & cboSearch
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
Me.txtNewText.SetFocus
End Sub
And finally, the following code on my txtNewText field: (you'll see I've had
help from this forum in writing these)
Private Sub txtNewText_AfterUpdate()
If Nz(Me.Notes, "") = "" Then
Me.Notes = Now() & " - " & Me.txtNewText
Else
Me.Notes = Me.Notes & vbCrLf & Now() & " - " & Me.txtNewText
End If
'Further examination of your code suggested following lines should be
'outside the Id/Else/End If but I'll leave that to you to decide.
Me.NewNotesDate = Date
Me.txtNewText = "<F5 to enter new notes info here>"
Me.StudentStatus.SetFocus
End Sub
TIA ....
I have the following code in my form, which works perfectly for another DB
but in my new DB, rather than going to the "txtNewText" field - using F5
causes me to jump to the 1st record in my DB and the set.focus to the
"cboSearch" field
Private Sub form_keydown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyF5
txtNewText.SetFocus
End Select
End Sub
I have the following code on my cboSearch field (though cannot determine
whether anything is looping):
Private Sub cboSearch_AfterUpdate()
With Me.RecordsetClone
.FindFirst "ContactID = " & cboSearch
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
Me.txtNewText.SetFocus
End Sub
And finally, the following code on my txtNewText field: (you'll see I've had
help from this forum in writing these)
Private Sub txtNewText_AfterUpdate()
If Nz(Me.Notes, "") = "" Then
Me.Notes = Now() & " - " & Me.txtNewText
Else
Me.Notes = Me.Notes & vbCrLf & Now() & " - " & Me.txtNewText
End If
'Further examination of your code suggested following lines should be
'outside the Id/Else/End If but I'll leave that to you to decide.
Me.NewNotesDate = Date
Me.txtNewText = "<F5 to enter new notes info here>"
Me.StudentStatus.SetFocus
End Sub
TIA ....