Dealing with Languages and List Boxes

C

Carlee

Hi,

I have a client who requires list box content to be available in french and
englsih. I have accommodated this for the most part but am have trouble in
one area:

The background:
Database captures veterinarians and what they are licenced to do

The plan:
I want to enable the user to click a button on the vet profile to display
all the activities the vet can perform. From there, i want to enable the
user to click another button to add or remove activities from the vet list.

The Problem: I can do this great for one language, but when i try to get
two languages (using an if statemet) it throws a syntax error.

Any suggestions on how i can accomplish creating one form that, depending on
the language selected (toggle button on a previous screen) enables the user
to view and modify activities associated to a vet?

Below is the code i use for the english portion. I use the exact same code,
adding in the
AccreditationFrench field and i get a syntax error.

Suggestions?


Dim db As DAO.Database, rs As DAO.Recordset, rs2 As DAO.Recordset
Dim strSQL As String, Criteria As String
Dim i As Integer


strSQL = "SELECT tblAccreditation.AccreditationID, " & _
"tblAccreditation.Accreditation, " & _
"tblAgreementDetails.AgreementID " & _
"FROM tblAccreditation INNER JOIN tblAgreementDetails " & _
"ON tblAccreditation.AccreditationID =
tblAgreementDetails.AccreditationID " & _
"WHERE tblAgreementDetails.AgreementID= " &
[Forms]![frmAccreditationSelect]!txtAgreementID

'MsgBox strSQL
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)

For i = 0 To lstAccreditation.ListCount - 1
Criteria = "[Accreditation] = '" & lstAccreditation.Column(1, i) & "'"
'MsgBox Criteria
If Not rs.BOF Then
rs.FindFirst Criteria
If rs.NoMatch = False Then
lstAccreditation.Selected(i) = True
Else
lstAccreditation.Selected(i) = False
End If
End If
Next i






Carlee
 

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