Search Form

  • Thread starter Thread starter SS
  • Start date Start date
S

SS

Hi

I have done this before and everything works fine but I have just created a
new form to search a database and give the results but it is not just
supplying the name I have searched for.

Now I don't know if this makes any difference but the database is updated
from another form but don't see why this should make any difference.

I have set the criteria to Equals eg First Name Equals First Name so if I
type Joseph I get not only Joseph but other first names.

Any ideas would be great as this is really getting to me!

Cheers Shona
 
Please post the SQL you are using. The snippet shown in your post has
a space in the field name - there should never be spaces in field
names.
 
Hi thanks for that there are no spaces sorry it is just the way I typed it
here.

I've discovered what it was one of the fields I had in the search form
didn't always have an entry having changed this information it seems to be
OK now.

Although I do have another little query! If I add to search on ID as well
as the other fields it works on ID but get an error message on the other
fields.

Do you know anyway around this?

Cheers Shona
 
And the error message is...?

Are the other fields empty?
Do they have the correct form of data (numbers or text as expected by
the database)?
Are the field names spelled correctly, including CaSe?
 
Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression '(FirstName = 'Steve' OR UserName = '' OR ID =
OR LastName = '')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for
all form fields that are used in the query.

None of the fields are empty I managed to get around this yesterday when I
wasn't doing a search on ID by changing the database to Allow Zero Length
but I don't get this option on ID.

It now works on ID but not on FirstName, UserName or LastName. I haven't
changed any of the HTML so everthing has been set up using the DRW.

Cheers Shona
 
Back
Top