I am using Access 2003 and I want to code a little module to do the following:
I have a label at in the header of several reports that will change every week. Rather then go through and replace the label for each report every week I would like to code a module that will prompt the user for the data they want in the label, then take that input and change all the report header labels to that date. However I cannot figure out how to make the text of a label the variable value.
I tried label.text but that does not work in my version of VB. I tried label.caption, but that did not work either.
- Code: Select all
I set it up as such (note I am using generic names)
Dim input as String
input = InputBox("Prompt","Title","Default value")
Dim label1 as Label
label1 = Generic_Report.ChangeLabel
label1.Caption = input
The above did not work
Any help would be much appreciated.