Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Make macro run when I hit the enter key | Excel Discussion (Misc queries) | |||
Macro won't run macro | Excel Discussion (Misc queries) | |||
Macro and sub rountines | Excel Discussion (Misc queries) | |||
Macro for multiple charts | Excel Worksheet Functions |