I have a form to search my database which I created in FP2000 (DRW). However, I think the code is completly wrong. I would be most grateful if someone can guide me in the right direction here.

I have 4 search entries to quiry the database and they are: (language from), (language to), (area) and (Name).

What I want them to search in the database is as follows:

language from = search in database under fields (languagefrom1,languagefrom2,languagefrom3) for a match.

language to = search in database under fields (languageto1,languageto2) for a match.

area = search in database under fields (area1, area2 through to area8) for a match.

name = Search under name field

The code that i have now is:

fp_sQry="SELECT * FROM Results WHERE (Translatefrom1 LIKE '%::Translatefrom1::%' OR Translatefrom2 LIKE '%::Translatefrom2::%' OR Translatefrom3 LIKE '%::Translatefrom3::%' AND Translateto1 LIKE '%::Translateto1::%' OR Translateto2 LIKE '%::Translateto2::%' AND Area1 LIKE '%::Area1::%' OR Area2 LIKE '%::Area2::%' OR Area3 LIKE '%::Area3::%' OR Area4 LIKE '%::Area4::%' OR Area5 LIKE '%::Area5::%' OR Area6 LIKE '%::Area6::%' OR Area7 LIKE '%::Area7::%' OR Area8 LIKE '%::Area8::%' AND Name LIKE '%::Name::%')"

And the code for the form is:

<td><input TYPE="TEXT" NAME="Translatefrom" VALUE="<%=Request("Translatefrom1")%>" size="20"></td>
<td><input TYPE="TEXT" NAME="Translateto" VALUE="<%=Request("Translateto1")%>" size="20"></td>
<td><input TYPE="TEXT" NAME="Area" VALUE="<%=Request("Area1")%>" size="20"></td>
<td><input TYPE="TEXT" NAME="Name" VALUE="<%=Request("Name")%>" size="20"></td>

Thanks you in advance for any help