Solved

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

Posted on 2011-03-13
3
413 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 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

688 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