Onlylonely
Registered User.
- Local time
 - Today, 16:15
 
- Joined
 - Jan 18, 2017
 
- Messages
 - 43
 
Hi Guys, 
Appreciate if you could help me out.
Objective: My forms have lot of radio button and i want it to come out msgbox if the user not selected the radio button.
Issue i'm facing: i try to tag all the radio button with STEP1. then use tag to control them. Below is my code. NA = 3
But i cant achieve what i want.
	
	
	
		
 Appreciate if you could help me out.
Objective: My forms have lot of radio button and i want it to come out msgbox if the user not selected the radio button.
Issue i'm facing: i try to tag all the radio button with STEP1. then use tag to control them. Below is my code. NA = 3
But i cant achieve what i want.
		Code:
	
	
	Function checkforSTEP1() As Boolean
checkforSTEP1 = True
Dim ctrl As Control
For Each ctrl In Me.Controls
If ctrl.Tag = "STEP1" Then
[COLOR="Red"]If .Value(ctrl) = 3 Then[/COLOR] [COLOR="red"]<< Error showing here[/COLOR]
checkforSTEP1 = False
End If
End If
Next
End Function
If checkforSTEP1() = False Then
    MsgBox ("Error : All fields are mandatory !!")
    
Else
End If