Hi,
I am having a problem creating some code for some option buttons. I am using these over a picture background (scan of a paper form) so that the user can easily enter the info.
however this leaves me with over 200 option buttons to code. I am using a textbox under the picture so that when you choose one of the options, the right info is displayed (txtOptionChosen)
This is the way I started coding before I thought about how much writing this would involve!
I thought about using:
Dim message1 as String
message1 = "Fatal accident to member of public"
and adding the rest in but this would still involve writing separate code for each button. Maybe I will need to but I want to make sure before I do!
I can post the picture here if that will help?
Craig
I am having a problem creating some code for some option buttons. I am using these over a picture background (scan of a paper form) so that the user can easily enter the info.
however this leaves me with over 200 option buttons to code. I am using a textbox under the picture so that when you choose one of the options, the right info is displayed (txtOptionChosen)
Code:
Private Sub Option419_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtOptionChosen.Value = "Fatal Accident to Member of Public - Fall from Scaffolding Structure"
End Sub
Private Sub Option421_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtOptionChosen.Value = "Major Accident to Member of Public - Fall from Scaffolding Structure"
End Sub
Private Sub Option423_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtOptionChosen.Value = "3 Day Accident to Member of Public - Fall from Scaffolding Structure"
End Sub
This is the way I started coding before I thought about how much writing this would involve!
I thought about using:
Dim message1 as String
message1 = "Fatal accident to member of public"
and adding the rest in but this would still involve writing separate code for each button. Maybe I will need to but I want to make sure before I do!
I can post the picture here if that will help?
Craig