By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,077 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

findRecord method

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <wo*********@hotmail.com> wrote in message
news:e5*************************@posting.google.co m...
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

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.