Hi Andi :-)
On Thu, 23 Dec 2004 18:17:35 -0500, "Jan Il"
wrote:
is the input everytime a Number? (NewData)
is the field Transaction numeric?
I changed also the Docmd.openform
Private Sub Combo0_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Handler
Dim rst As DAO.Recordset
Dim lngTransaction As Long
If MsgBox(NewData & " ... not in list, add it?", _
vbOKCancel, "New Transaction") = vbOK Then
Set rst = CurrentDb.OpenRecordset("MyCheckRegister")
With rst
.AddNew
.Fields("Transaction") = NewData
If IsNull(Me.txtTransactionDate) Then
.Fields("TransactionDate") = Now()
' .Fields("TransactionDate") =#1/1/1900#
Else
.Fields("TransactionDate") = _
Format(Me.txtTransactionDate, "\#mm\/dd\/yyyy\ hh\:nn\:ss\#")
End If
.Update
' .Bookmark = .LastModified
' lngTransaction = .Fields("Transaction")
.Close
End With
Response = acDataErrAdded
DoCmd.OpenForm "frmCkEntry", , , "Transaction =" _
& NewData, , acDialog
Else
Response = acDataErrContinue
End If
Exit_He
Set rst = Nothing
Exit Sub
Err_Handler:
Response = acDataErrContinue
MsgBox "Error: " & Err.Description
Resume Exit_Here
End Sub
BTW: its nearly 1' o'clock in the night at my timezone, therefore I am
going to sleep now
read you tomorrow
Sorry to be so long in getting back to you. I had a last minute invite to
Ft. Myers, FL for a Christmas week holiday. No way was I passing it up,
'specailly when it was 22 degrees here in Warrenton, VA, and 70 in Ft.
Myers. Just got back late this afternoon, so catching up. I'll try this in
the morning and let you know how it goes. Hope you haven't lost interest,
and that you had a wonderful Christmas and New Years holiday.
Thank you for your time and assistance, I really do appreciate it. Again,
sorry to leave you in the dark for so long....... g
Jan
Smiles are meant to be shared,
that's why they're so contagious.