Good Morning,
I have three option buttons on a form stored within a frame
I want to reference them such as:
If opt70 is chose then
do commands
else if opt140 is chose then
do commands
else
do commands
end if.
This is how I currently have it, but the frmDelivery.Value is obviously not the right choice because I cannot change the selection on the form, which is defaulted in based on account
I have three option buttons on a form stored within a frame
I want to reference them such as:
If opt70 is chose then
do commands
else if opt140 is chose then
do commands
else
do commands
end if.
This is how I currently have it, but the frmDelivery.Value is obviously not the right choice because I cannot change the selection on the form, which is defaulted in based on account
Code:
Private Sub frmDelivery_AfterUpdate()
Dim strSQL As String
Dim strJobID As String
Dim db As Database, rs As Recordset
Select Case frmDelivery.Value
Case 1
Set db = CurrentDb
strSQL = "UPDATE user_tblJobProp" & " " & _
"SET user_tblJobProp.[Delivery_Value]= 1" & " " & _
"where user_tblJobProp.[ID]= '" & is_modoutline_getcurrentid() & "'"
DoCmd.RunSQL strSQL
Debug.Print strSQL
Case 2
strSQL = "UPDATE user_tblJobProp" & " " & _
"SET user_tblJobProp.[Delivery_Value]= 2" & " " & _
"where user_tblJobProp.[ID]= '" & is_modoutline_getcurrentid() & "'"
DoCmd.RunSQL strSQL
Case 3
strSQL = "UPDATE user_tblJobProp" & " " & _
"SET user_tblJobProp.[Delivery_Value]= 3" & " " & _
"where user_tblJobProp.[ID]= '" & is_modoutline_getcurrentid() & "'"
DoCmd.RunSQL strSQL
Case Else
Frame6.Value = Null
End Select
End Sub