Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open Finder with command Button

Posted on 2004-08-06
9
Medium Priority
?
415 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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

783 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