Hi all,
I'm currently creating a database for doing checks and logging wether a station has passed or failed the check.
I have a userform with a pass/fail option button for each station and I'm looking to populate a textbox in another userform with the station numbers that have failed.
However, I am struggling to find a way to populate one textbox with results from multiple option button groups. I have tried elseif statements and a number of techniques but I have had no luck and my excel vba knowledge is still limited.
So you select what stations have passed/failed then when you press continue the second userform appears. I would like the failed stations to be populated automatically into the Failed Station Numbers text box. I have it coded so that the date and area automatically populated.
This is an example of the code I was trying:
I'm currently creating a database for doing checks and logging wether a station has passed or failed the check.
I have a userform with a pass/fail option button for each station and I'm looking to populate a textbox in another userform with the station numbers that have failed.
However, I am struggling to find a way to populate one textbox with results from multiple option button groups. I have tried elseif statements and a number of techniques but I have had no luck and my excel vba knowledge is still limited.
So you select what stations have passed/failed then when you press continue the second userform appears. I would like the failed stations to be populated automatically into the Failed Station Numbers text box. I have it coded so that the date and area automatically populated.
This is an example of the code I was trying:
VBA Code:
Private Sub cmdSTcheck_Click()
DiodeForm.Hide
frmWeeklyForm.txtArea.Value = "Diode"
If Me.opt1fail.Value = True Then
frmWeeklyForm.txtFails.Value = "1"
End If
If Me.opt2fail.Value = True Then
frmWeeklyForm.txtFails.Value = "2"
End If
frmWeeklyForm.Show
End Sub