With repetitive data, sometimes I "build" my references via VBA.
For referencing table field names, I can use rst.Fields("name")
Example: A table with fields for PhoneHome, PhoneWork, PhoneFax
I can reference them by rst.Field("Phone" & strType)
Where strType is a variable set to "Home" or "Work" or "Fax"
For referencing controls on a form, I can use Me("name")
Example: A form with text controls for PhoneHome, PhoneWork, PhoneFax
I can reference them by Me("Phone" & strType)
Where strType is a variable set to "Home" or "Work" or "Fax"
But if I have dimmed variables (not fields or form controls),
How can I reference them via VBA?
Example:
Dim Appt0800 as String
Dim Appt0930 as String
Dim Appt1300 as String
Dim Appt1430 as String
If I have a variable strTime = "0930"
How can I reference the variable named Appt0930?
I Hope This Makes Sense
Thanks,
Fred