I m having a serious problem with the syntax for some string operations. What i want to do is, for example, to take a string from a text box that is a question, eg. "where is tower bridge", and i want to be able to recognise the part of the string 'where' in the question and compare the 'london bridge' with a list of sights in a db.
for example in pseudo code:
if question CONTAINS 'where is' and 'sights'
reply = "'sight' is near 'tube station'
can anyone help me with this dillema?
many thanks in advance
If I do not mis-understand your question, you want to know if the question entered by the user contains some words which are stored in database. For this case, you need a LOOP to find if the words is in the question.
Do While Not theRS.EOF
If InStr(question, RS("sights")) > 0 Then
'*** do something here ***