Search Form

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
 
R

Ronx

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.
 
S

SS

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
 
R

Ronx

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?
 
S

SS

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
 

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