M
Mike
I was wondering if there is a way to loop through a table,
check a field in each record, and then display a message
box.
For example, each record has an expiry date, and I want to
compare each expiry date (datExpires) to the current date
(Date()). eg: datExpires <= Date() then msgbox("The
product has expired)
I attempted doing this with a macro, but it did not have
the degree of control that I was looking for. So, I
decided I want to do this in Visual Basic code.
I know how to do loops, if statements, and all of that
basic stuff. My problem is looping through a table. Is a
table an array? Does it have a value that can return the
number of records?
For example, can I do something like Tables!
[tblName].numberOfRecords (or something similar) and then
look at each individual record using an index.
I know this may sound a little confusing, but any help
would be greatly appreciated.
check a field in each record, and then display a message
box.
For example, each record has an expiry date, and I want to
compare each expiry date (datExpires) to the current date
(Date()). eg: datExpires <= Date() then msgbox("The
product has expired)
I attempted doing this with a macro, but it did not have
the degree of control that I was looking for. So, I
decided I want to do this in Visual Basic code.
I know how to do loops, if statements, and all of that
basic stuff. My problem is looping through a table. Is a
table an array? Does it have a value that can return the
number of records?
For example, can I do something like Tables!
[tblName].numberOfRecords (or something similar) and then
look at each individual record using an index.
I know this may sound a little confusing, but any help
would be greatly appreciated.