NotInList Help

B

Bob V

This Code gives the last remark by date for Category, Is it possible to
alter this so is to give all remarks by category chosen in the last 60 days.
The date field is dtDate in tblRemarks.....Thanks for any
Help...............Bob

Private Sub cbCategory_NotInList(NewData As String, Response As Integer)
On Error GoTo Err_Handler
Dim recCategory As ADODB.Recordset
Set recCategory = New ADODB.Recordset
recCategory.Open "select * from tblCategory", CurrentProject.Connection,
adOpenDynamic, adLockOptimistic
recCategory.AddNew
recCategory.Fields("Category") = NewData
recCategory.Update
Response = acDataErrAdded
Exit Sub
Err_Handler:
MsgBox Err.Number & "::" & Err.Description
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top