A
Alex Martinez
Hello,
I have a unbound combo box that will search for a policy number and will
return the value in the other fields in my form if the policy number is
matched. Below is my code. I have a label that will display if there is a
match. My problem is if there is a policy number match the label "No Match"
will appear. No Match should only appear if there is truly no policy match.
I should only get the label "Match" if there is a match. Now the policy
number goes like this G45640, but the user will input g45640 in the unbound
combobox now I don't know if this matters. If I need to capalitaize the G
how do I do that? Any tips will be appreciated. Thank you in advance.
Private Sub cboSearch_AfterUpdate()
On Error GoTo Err_cboSearch_AfterUpdate
'Quick search of policy number for assigning
DoCmd.GoToControl "PolicyNumber"
DoCmd.FindRecord cboSearch
DoCmd.GoToControl "PolicyNumber"
'Set Policy Matched label to visible = True
If [PolicyNumber] = [cboSearch] And toggleSnapShotAssignedTo.Value = -1 Then
lblPolicyMatch.Visible = True
Else
lblNoMatch.Visible = True
txtSnapShotAssignedTo = Null
End Sub
I have a unbound combo box that will search for a policy number and will
return the value in the other fields in my form if the policy number is
matched. Below is my code. I have a label that will display if there is a
match. My problem is if there is a policy number match the label "No Match"
will appear. No Match should only appear if there is truly no policy match.
I should only get the label "Match" if there is a match. Now the policy
number goes like this G45640, but the user will input g45640 in the unbound
combobox now I don't know if this matters. If I need to capalitaize the G
how do I do that? Any tips will be appreciated. Thank you in advance.
Private Sub cboSearch_AfterUpdate()
On Error GoTo Err_cboSearch_AfterUpdate
'Quick search of policy number for assigning
DoCmd.GoToControl "PolicyNumber"
DoCmd.FindRecord cboSearch
DoCmd.GoToControl "PolicyNumber"
'Set Policy Matched label to visible = True
If [PolicyNumber] = [cboSearch] And toggleSnapShotAssignedTo.Value = -1 Then
lblPolicyMatch.Visible = True
Else
lblNoMatch.Visible = True
txtSnapShotAssignedTo = Null
End Sub