Solved

Open Finder with command Button

Posted on 2004-08-06
9
410 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Expert Comment

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

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

623 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