A
A man
I haven't used A2000 for a while. I searched the help for this but couldn't
find anything. I'm using a DAO recordset and the Filter property. How do I set
the filter property to find all records where [catnum] starts with HS?
I tried this but it doesn't work.
Set mydb = CurrentDb()
Set myset = mydb.OpenRecordset("MainQry", dbOpenDynaset)
myset.Filter = "[CatNum] like 'HS*'"
myset.MoveFirst
myset.MoveLast
cnt = myset.RecordCount
myset.MoveFirst
I'd rather not have to make separate queries for records that start with HS and
all other records. It just makes things messier.
Also, does VBA support regular expressions? I want to check if a variable
contains a number or not.
Thank you.
--
find anything. I'm using a DAO recordset and the Filter property. How do I set
the filter property to find all records where [catnum] starts with HS?
I tried this but it doesn't work.
Set mydb = CurrentDb()
Set myset = mydb.OpenRecordset("MainQry", dbOpenDynaset)
myset.Filter = "[CatNum] like 'HS*'"
myset.MoveFirst
myset.MoveLast
cnt = myset.RecordCount
myset.MoveFirst
I'd rather not have to make separate queries for records that start with HS and
all other records. It just makes things messier.
Also, does VBA support regular expressions? I want to check if a variable
contains a number or not.
Thank you.
--