Okay, back to this whole deal. This may not work, or I may be off the wall in how to make it work, but I would think I could do something like this. Any suggestions as to the format, or how to run the idea?
Code:
Private Sub cmbComments_AfterUpdate()
~code to run after update
End Sub
Private Sub cmbComments_BeforeUpdate()
~code to run before update (this is just extra stuff
for taking a set phrase, and allowing user to add to
it - works great!
End Sub
Private Sub cmbComments_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 or KeyCode = 13 Then
Call cmbComments_BeforeUpdate
Call cmbComments_AfterUpdate
Else
Cancel/Don't Call cmbComments_BeforeUpdate
Cancel/Don't Call cmbComments_AfterUpdate
End If
End Sub
Okay, of course some of this is more or less psuedo code, but it's my thoughts nonetheless. Basically, If Tab or Enter (9 or 13) is entered, then I want it to check to see if the "comment" given is in the tblComments table, and if so, ask if the user wants to add to the comment.. then run the after update event, where the record is saved, move to the next record, and set particular fields on the form equal to the previous values (fields that don't need to change very often).
Of course, If Tab or Enter (9 or 13) is not entered there, then I don't want any of the BeforeUPdate or AfterUpdate code to run, b/c that would mean that the user decided to just click on another control or something, and change the info the put there. Basically, the way I had it working before was I had the _LostFocus event calling the _AfterUpdate event, so that that would occur if nothing was entered into the cmbComments control.
Anyway, any suggestions would be greatly appreciated at this point... as to my idea, it's probability, and how to possibly make it work.
Stephen
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV