Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 1st, 2004, 01:13 PM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Associate "Find" command on form

I have created a Find button on a form and need to limit it to search a defined field. How do I do that?

GRPinkney
 
Old August 21st, 2004, 11:55 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I suggest u read pg 239, Connell,John,"Beginning Visual Basic 6 Database Programming", apress.com is the publisher.
Trully Penta.

 
Old August 21st, 2004, 04:51 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

There various ways that this can be accomplished.

Here is an example based on the northwind database table employees

SELECT Employees.EmployeeID, Employees.LastName, Employees.FirstName, Employees.Title, Employees.TitleOfCourtesy, Employees.BirthDate, Employees.HireDate, Employees.Address, Employees.City, Employees.Region, Employees.PostalCode, Employees.Country, Employees.HomePhone, Employees.Extension, Employees.Photo, Employees.Notes, Employees.ReportsTo
FROM Employees
WHERE (((Employees.LastName)=[Enter LastName]));

What this will do is ask for the parameter value to be enter for the field name 'lastname'
this is done by going to your query design selecting view sql, then write your sql statement here. (which is the example above) use your own database and table. Base your find button on the query you create.
 
Old August 23rd, 2004, 05:51 AM
Registered User
 
Join Date: Nov 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanks for that; I will try it later today

GRPinkney





Similar Threads
Thread Thread Starter Forum Replies Last Post
Referencing Command buttons on a form spiderman Access 1 September 6th, 2007 06:56 AM
HELP!!!Coding a command button to open a form solva Beginning VB 6 5 May 10th, 2005 09:56 PM
Trouble creating a Copy Record command on a Form Ron V Access 0 May 19th, 2004 01:36 PM
sql command to find duplicate records? qwjunk Classic ASP Databases 1 January 31st, 2004 03:32 PM
Can't find form mschenk Access 4 December 2nd, 2003 01:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.