Solved

Open Finder with command Button

Posted on 2004-08-06
9
403 Views
Last Modified: 2006-11-17
We are trying to input data for a Real estate database where you input City and State into a form and certain processes take place.  However we are inputing hand written data from a person with awful handwriting and we need a way to search our city table to see related cities and towns.  We want a command button that when clicked will bring up the Find Menu set to that table.  Any ideas would help a lot.
0
Comment
Question by:bobbobruns12
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 15

Expert Comment

by:will_scarlet7
ID: 11736611
Something like this?:

Private Sub CmdSearch_Click()
On Error GoTo Err_CmdSearch_Click


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

Exit_CmdSearch_Click:
    Exit Sub

Err_CmdSearch_Click:
    MsgBox Err.Description
    Resume Exit_CmdSearch_Click
   
End Sub
0
 

Author Comment

by:bobbobruns12
ID: 11736708
Private Sub FindCitycmd_Click()
On Error GoTo Err_FindCitycmd_Click


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

Exit_FindCitycmd_Click:
    Exit Sub

Err_FindCitycmd_Click:
    MsgBox Err.Description
    Resume Exit_FindCitycmd_Click
   
End Sub

Yeah thats the code from the Find record button.  Unfortunately it doesnt do anything.  It just says "the expression you entered refers to an object that is closed or doesnt exist"
0
 
LVL 15

Expert Comment

by:will_scarlet7
ID: 11736775
Are you trying to search the Form's recordset or a different recordset that gets modified on a command from the form?
0
 

Author Comment

by:bobbobruns12
ID: 11736801
I'm trying to search a table that is somewhat unrelated to the form.  It is a table that we use to look up zipcodes and counties when the user enters a city and state combo.  It isnt used to contain the records for the form, simply a lookup for the form.  
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 119

Expert Comment

by:Rey Obrero
ID: 11736864

you can use
Private Sub cmdFind_Click()
DoCmd.OpenTable "TableName", acViewNormal

End Sub

this will open the table in view mode where you can search.
0
 

Author Comment

by:bobbobruns12
ID: 11736885
That sounds like a good start, is there a command to bring up the search box once the table is opened?
0
 
LVL 8

Accepted Solution

by:
Mourdekai earned 500 total points
ID: 11737749
DoCmd.RunCommand acCmdFind

In my experience DoMenuItem's won't work if you have made your own menus.  
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 11737791

adding mourdekai's command line

Private Sub cmdFind_Click()
DoCmd.OpenTable "TableName", acViewNormal
DoCmd.RunCommand acCmdFind

End Sub


should get you going.
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 11738126
bobbobruns12,
??????  should have split the points?
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now