I have a subform in a form and I want to pick up the value of one field in a user selected record in the subform and populate a field in my form using that value.
I am using .Selheight to determine the number of records selected in the subform. The code goes like this:
If Me.Frm_ICD10CMCodes.Form.SelHeight = 0 Then
MsgBox "Please select one record. You have selected " & Me.Frm_ICD10CMCodes.Form.SelHeight & " records.", vbOKOnly, "Dr Talking:"
ElseIf Me.Frm_ICD10CMCodes.Form.SelHeight = 1 Then
'Copy the diagnosis in the diagnosis box
ElseIf Me.Frm_ICD10CMCodes.Form.SelHeight > 1 Then
MsgBox "Please select only one record.", vbOKOnly, "Dr Talking:"
End If
The Form.SelHeight property returns the value 0 no matter how many records I select when I run the code.