Hello, using VBA I would like to select entries in a table where a certain criteria is met. I would then like a count of those entries.
Those selected entries would then be pasted into another table but not all of the columns, only a select few.
How would I go about doing this? Would I need to store the entries as a list and then populate the other table using a for statement and DAO code similar to the one below?
Code:
Dim rstProjects As DAO.Recordset
Dim dbTable As DAO.Database
Dim pnumber As Integer
pnumber = Text198.Value
Set dbTable = CurrentDb
Set rstChanges = dbTable.OpenRecordset("Active Projects")
rstChanges.AddNew
rstChanges("Project_Number").Value = pnumber
rstChanges.Update