Hi, i have a group box with 2 radio buttons; failure and success. I need to have the text (either failure or success) saved in the access 2007 database instead of values (1 or 2). The same is also happening with the combo boxes.
Here's the code am using: (i want them to be added on a button click)
Private Sub Command55_Click()
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim str4 As String
'set combobox values
Dim str5 As String
Dim str6 As String
Dim str7 As String
Dim str8 As String
Dim cn As Connection
Dim rs As New ADODB.Recordset
str1 = Text27.Value
str2 = Diagnosis.Value
str3 = Solution.Value
str4 = Status.Value
'combo boxes
str5 = Departments.Value
str6 = Users.Value
str7 = Combo18Value
str8 = Combo20.Value
rs.Open "SELECT * FROM [Incidents]", CurrentProject.Connection, adOpenStatic, adLockOptimistic '
With rs
.AddNew
.Fields("Details") = str1
.Fields("Diagnosis") = str2
.Fields("Solution") = str3
.Fields("Status") = str4
.Fields("DeptName") = str5
.Fields("UserName") = str6
.Fields("Technician") = str7
.Fields("Problem") = str8
.Update
.Close
End With
End Sub
Any help will be appreciated.