Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Queries in Access
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00501255
Message ID:
00501294
Vues:
12
>Hi,
>I Have my VB hooked up to Access and am trying to use multiple criteria searching one table. There is probably a simple answer I just can't find it. The code so far is:
>
>
>Dim CurrentSalary As String
>Dim EducationLevel As String
>Dim JobSector As String
>
>CurrentSalary = SearchCVresults.Combo9.Text
>EducationLevel = SearchCVresults.Combo10.Text
>JobSector = SearchCVresults.Combo11.Text
>
>Data1.RecordSource = "SELECT * FROM CV WHERE Salary = '" & CurrentSalary & "' & EducationLevel = '" & EducationLevel & "' & JobSector = '" & JobSector & "' "
>
>
>I've tried to use the FindFirst/Next/Last method aswell but that doesn't seem to be working either. PLEEASE HELP ME!

Hi,

Try this:
Data1.RecordSource = "SELECT * FROM CV WHERE Salary = '" & CurrentSalary  & "' AND " & EducationLevel = '" & EducationLevel & "' AND " & "JobSector = '" & JobSector & "';"
HTH
Igor Gelin
Database Developer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform