Need Option Group calculated labels

G

Guest

Need Option Group calculated labels

I want to have Option Group labels that are calculated. The default will
display the current month, the next the previous month, etc.
I find that I can use text boxes to display the calculation but I can not
get the toggle buttons to be transparent to overlay the textbox.
I tried to expand the rectangle part of a radio button. The expanded area
acts like a text box (highlights) when I click it unless I click on a button
first then it acts like a toggle button.
Any other suggestions to try?
 
G

Guest

Hi Karl,

Why not just use the label itself to display the text you want;
Me.Label1.Caption = "Test"< put whatever coding you want for your date
format here.

TonyT..
 
G

Guest

Maybe I did not explain it properly. I want to labels to be dynamic
calculations. This month the top label will read
November 2006
2nd
October 2006
3rd
September 2006
and on for 12 labels/buttons so as to pull a report from that month.

Next month the top label will read
December 2006
2nd
November 2006
etc.
 
D

Douglas J. Steele

I just created a new form, and added an option group with 12 toggle buttons
in it. They got named Toggle3 to Toggle14 respectively. That means I can use
the following code to change the captions on those buttons:

For intLoop = 0 To 11
Me.Controls("Toggle" & intLoop + 3).Caption = _
Format(DateAdd("m", -intLoop, Date()), "mmmm yyyy")
Next intLoop
 
G

Guest

Thanks, I give it a try.

Douglas J. Steele said:
I just created a new form, and added an option group with 12 toggle buttons
in it. They got named Toggle3 to Toggle14 respectively. That means I can use
the following code to change the captions on those buttons:

For intLoop = 0 To 11
Me.Controls("Toggle" & intLoop + 3).Caption = _
Format(DateAdd("m", -intLoop, Date()), "mmmm yyyy")
Next intLoop
 

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