?
Solved

Setting default column to search in MS Access 2003 with "General Search" enabled?

Posted on 2011-03-13
3
Medium Priority
?
423 Views
Last Modified: 2013-11-27
Hi,
My client wants me to customize the search function in the MS Access 2003
database I set up for him to default to a specific column (the "Look In" field) AND have
a General search option.

First he wanted me to set it to "Any part of Field". That was no problem, just go
to the menu, options --> Edit/Find tab, and set the value to "General search". Ok, so
far, so good....

Problem is , the Search window defaults to the entire table in the "Look In" field, so he has to click
on that drop-down and select the column (which would only be the second choice
if the cursor is focused in the field he wants to search in). But he does this hundreds of times
a day, so...

He wants to have both the General Search (any part of field) and "Look In" default to one column
in the table. Is this possible? Do I have to to edit the Search's event procedure VB (If so, I'm clueless)

Can anyone help me out?

Jim

PS:  the VB for the Search is as follows, if I need to edit something in there to make this happen,
please specify:

Private Sub Find_the_part_Click()
On Error GoTo Err_Find_the_part_Click


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

Exit_Find_the_part_Click:
    Exit Sub

Err_Find_the_part_Click:
    MsgBox Err.description
    Resume Exit_Find_the_part_Click
   
End Sub


THANK YOU to anyone who can help!
0
Comment
Question by:jfstanley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 35123217
That's the nature of the builtin search feature. If you want more functionality you'll have to code that yourself. It can be done, but search functionality can get exceptionally involved.

Many applications have a search form that user can work with to locate records. The form consists of several different controls (textboxes, combos etc) which allow the user to select their criteria, and then a couple of buttons to allow them to actually do the search. Some search facilities show the results in a listbox, others just interact directly with the form (i.e. set the Form filer, or the Form Recordsource, etc etc).

I hate to say it, but if you're "clueless" about VBA and such, then you're probably going to have a difficult time with this.
0
 

Author Comment

by:jfstanley
ID: 35123258
So basically i would need to contract someone to code me a whole new search form to do
what my client wants... there's nothing i can do with that VB that I pasted at the end of my
message to make it happen?...ok, fair enough. Thanks.
0
 
LVL 85
ID: 35124060
That's right. The code you posted just invokes a menuitem (it's no different than clicking a button on the menu).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question