If condition

  • Thread starter newsgroup.microsoft.com
  • Start date
N

newsgroup.microsoft.com

Good afternoon,
On a report I would like a title (M., Mr. Mrs or Mme) to appear before the
full name of a person, according to gender and language spoken. What I did
does not work. Could you help me please? Thanks

Private Sub Report_Open(Cancel As Integer)
Dim title2
If sex = 1 Then
If french Is True Then
title2 = "M."
Else: title2 = "Mr."
End If
ElseIf sex = 2 Then
If french Is False Then
title2 = "Mme"
Else: title2 = "Ms."
End If
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top