#1   Report Post  
Aamer
 
Posts: n/a
Default Help Me Make Macro

have a form in my access 2003 database on which i embedded a "find record
button". when i clik on this button a window opens asking What to Find:

Look in: Search Form
Match: (options a Whole Field, Any Part Of Field, Start of Field)
Search: (options a All, Up, Down)


It works fine when i select "Any Part Of Field".

The code for the above FIND BUTTON is:

Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Find_Record_Click:
Exit Sub

Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click

End Sub



what i need is to crate a macro where I enter the value to be searched and
it finds that in Any Part Of Field in the querry. in this macro i do not need
to make a selection (Whole Field, Any Part Of Field, Start of Field) it just
looks up in the whole querry and give result.




Thanks
Aamer Sheikh

  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

Try this instead, perhaps:
http://www.officearticles.com/access...oft_access.htm
************
Anne Troy
www.OfficeArticles.com

"Aamer" wrote in message
...
have a form in my access 2003 database on which i embedded a "find record
button". when i clik on this button a window opens asking What to Find:

Look in: Search Form
Match: (options a Whole Field, Any Part Of Field, Start of Field)
Search: (options a All, Up, Down)


It works fine when i select "Any Part Of Field".

The code for the above FIND BUTTON is:

Private Sub Find_Record_Click()
On Error GoTo Err_Find_Record_Click


Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Exit_Find_Record_Click:
Exit Sub

Err_Find_Record_Click:
MsgBox Err.Description
Resume Exit_Find_Record_Click

End Sub



what i need is to crate a macro where I enter the value to be searched and
it finds that in Any Part Of Field in the querry. in this macro i do not
need
to make a selection (Whole Field, Any Part Of Field, Start of Field) it
just
looks up in the whole querry and give result.




Thanks
Aamer Sheikh



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Make macro run when I hit the enter key Tommy Excel Discussion (Misc queries) 1 May 16th 05 12:53 AM
Macro won't run macro dave glynn Excel Discussion (Misc queries) 0 May 3rd 05 04:13 PM
Macro and sub rountines The Good Deeds Team Excel Discussion (Misc queries) 1 March 23rd 05 11:26 PM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM


All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"