DoCmd.FindRecord error

G

Guest

I've been trying to figure out how to create a search box for a form I'm
working on that would allow me to search all fields, rather than one. I
pulled this bit of code off this site, and read up on the basics in Help, but
I keep getting an "error in FindRecord action argument". Could someone tell
me what's wrong?

DoCmd.FindRecord Me.txtSearch, acAnywhere, False, acSearchAll, False,
acAll

Also, with this code, do you run into the problem of it searching and
finding itself(meaning the value in the txtSearch field)?

Appreciate any help.

bear
 
J

jjsaw5 via AccessMonster.com

bear,

Maybe insted of having one feild that searchs everything, would it help if
you had a combo box that offered the different feilds, and the user can
select what feild they would like to search in, then based on what the user
picks you can filter an other combo box that will allow them to search for
records based on the feild they chose in the other combo box.

Example:

Have a combo box with: Books
Magizines
Authors....etc
Once the user selects the feild they would like to search.....Books

Combo box 2 : (filters based on selection in combo 1) User can enter book
name and pull up information by books.
 
G

Guest

Pretty good idea. I can think of a several places it would come in handy.
Unfortunately, this form as so many fields, I don't think it would be very
convenient. I would really like to create a searchbox similar to the ones
we're all so used to on websites. Type anything and it finds it (at least
within the record source for this particular form). Any idea how to create
one of those?
 
J

jjsaw5 via AccessMonster.com

I am actually trying to do that myself and am in the process of trying to
figure it out. As soon as i figure it out i will be sure to let you know!
Pretty good idea. I can think of a several places it would come in handy.
Unfortunately, this form as so many fields, I don't think it would be very
convenient. I would really like to create a searchbox similar to the ones
we're all so used to on websites. Type anything and it finds it (at least
within the record source for this particular form). Any idea how to create
one of those?
[quoted text clipped - 29 lines]
 

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

Similar Threads

FindRecord Problem 7
Debug Code 2
Syntax Help 5
FindRecord, FindNext 1
Search argument for DoCmd.FindRecord 1
findrecord in Access 2000 3
Find Button Error 3
Problem with FindRecord in Access 2007 1

Top