Connecting Tech Pros Worldwide Help | Site Map

findRecord method

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 05:21 AM
Stu Mac
Guest
 
Posts: n/a
Default findRecord method

Hi

I have a table with two fields

Key Info
1 a
2 b
3 c


I've created a simple form to display the info and I want to have
unbound text box and a find action button

I want to enter a value into the text box (key or info) and then click
the find button to jump the record matching that criteria. I'm trying
to use the findRecord method as below

DoCmd.FindRecord "b", acAnywhere, False, acSearchAll, False, acAll,
True

unfortunately I get a "Runtime error 2162 A macro set to one of the
current fields properties failed because of an error in a FindRecord
action agument

N.B I'm not using a macro per say i'm using wrting my own action event
for "on_click"

Any help would be much appreciated. I don't really want to use Access
existing Find and Replace tool

thanks very much

  #2  
Old November 13th, 2005, 05:21 AM
Phil Stanton
Guest
 
Posts: n/a
Default Re: findRecord method

Try

Docmd.GotoControl "Info"
DoCmd.FindRecord FindBox, acStart

where FindBox is where you type your letter (This will only find the first
instance)
Buch better to use a ComboBox and jump to the right record on AfterUpdate
of the Combo

HTH

Phil


"Stu Mac" <wolffcastle@hotmail.com> wrote in message
news:e56b2423.0412140913.4e83e4a@posting.google.co m...[color=blue]
> Hi
>
> I have a table with two fields
>
> Key Info
> 1 a
> 2 b
> 3 c
>
>
> I've created a simple form to display the info and I want to have
> unbound text box and a find action button
>
> I want to enter a value into the text box (key or info) and then click
> the find button to jump the record matching that criteria. I'm trying
> to use the findRecord method as below
>
> DoCmd.FindRecord "b", acAnywhere, False, acSearchAll, False, acAll,
> True
>
> unfortunately I get a "Runtime error 2162 A macro set to one of the
> current fields properties failed because of an error in a FindRecord
> action agument
>
> N.B I'm not using a macro per say i'm using wrting my own action event
> for "on_click"
>
> Any help would be much appreciated. I don't really want to use Access
> existing Find and Replace tool
>
> thanks very much[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.