increment along a group of variables

D

Dickie Black

Hi,

I want to use a Dlookup to find records from a specific day, at a number of
times during that day. I know i will have to use a separate Dlookup for
each value i want to return, so I was going to use a for...next statement.
However, the times are non-sequential (eg 09:30, 11:15, 12:20 etc). I can
store these time values in a group of variables (var1, var2, var3 etc), but
how can I use some form of increment (eg var & i) to specify which one to
use, or is some other method necessary?

Example code:

For i =1 to 5

me("textbox" & i).caption = Dlookup("[Title]", rs, "[StartTime] = var & i")

(where rs is the recordset previously defined, incorporating a date value)

TIA

Dickie Black
 

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