I'm using Access 2010 and I’ve tried 2 different methods to get my radio button to insert text instead of numeric 1 or 2. This does the same thing with onClick and AfterUpdate.
METHOD NUMBER 1: This works but the radio button stay “grayed” out, they do not check off when clicked. “Me.Patient_location_30_days_post_discharge.Value” is a hidden field.
Private Sub rdoLocation_Click()
Select Case rdoLocation.Value
Case Is = "1"
Me.Patient_location_30_days_post_discharge.Value = "Home"
Case Is = "2"
Me.Patient_location_30_days_post_discharge.Value = "Hospital or Acute Care Facility"
Case Is = "3"
Me.Patient_location_30_days_post_discharge.Value = "Short term rehabilitation facility"
Case Is = "4"
Me.Patient_location_30_days_post_discharge.Value = "Chronic health care facility"
Case Is = "5"
Me.Patient_location_30_days_post_discharge.Value = "ND or Cannot be determined"
End Select
End Sub
METHOD NUMBER 2: I tried using a DAO insert statement but it just inserts 1 or 2 into the field. I went into the reference library to check of DAO but I get this error “Name conflicts with existing module”
Private Sub Frame97_Click()
Dim addPatientLocation As Integer
Dim Outcome As DAO.Database
Dim Patient As DAO.Field
Set dbsOutcome = CurrentDb
Set rstPatientLocation = dbsOutcome.OpenRecordset("Patient")
With dbs
Select Case Frame97.Value
Case Is = "1"
rstPatientLocation.AddNew
rstPatientLocation.Patient_location_30_days_post_discharge.Value = "Home"
Case Is = "2"
rstPatientLocation.AddNew
rstPatientLocation.Patient_location_30_days_post_discharge.Value = "Hospital or Acute Care Facility"
End Select
rstPatientLocation.Update
End With
End Sub
Any help is apprecaited, thanks!
METHOD NUMBER 1: This works but the radio button stay “grayed” out, they do not check off when clicked. “Me.Patient_location_30_days_post_discharge.Value” is a hidden field.
Private Sub rdoLocation_Click()
Select Case rdoLocation.Value
Case Is = "1"
Me.Patient_location_30_days_post_discharge.Value = "Home"
Case Is = "2"
Me.Patient_location_30_days_post_discharge.Value = "Hospital or Acute Care Facility"
Case Is = "3"
Me.Patient_location_30_days_post_discharge.Value = "Short term rehabilitation facility"
Case Is = "4"
Me.Patient_location_30_days_post_discharge.Value = "Chronic health care facility"
Case Is = "5"
Me.Patient_location_30_days_post_discharge.Value = "ND or Cannot be determined"
End Select
End Sub
METHOD NUMBER 2: I tried using a DAO insert statement but it just inserts 1 or 2 into the field. I went into the reference library to check of DAO but I get this error “Name conflicts with existing module”
Private Sub Frame97_Click()
Dim addPatientLocation As Integer
Dim Outcome As DAO.Database
Dim Patient As DAO.Field
Set dbsOutcome = CurrentDb
Set rstPatientLocation = dbsOutcome.OpenRecordset("Patient")
With dbs
Select Case Frame97.Value
Case Is = "1"
rstPatientLocation.AddNew
rstPatientLocation.Patient_location_30_days_post_discharge.Value = "Home"
Case Is = "2"
rstPatientLocation.AddNew
rstPatientLocation.Patient_location_30_days_post_discharge.Value = "Hospital or Acute Care Facility"
End Select
rstPatientLocation.Update
End With
End Sub
Any help is apprecaited, thanks!