DoCmd.FindRecord error

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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?
 
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]
 
Back
Top