Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 September 19th, 2005, 07:46 PM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default search table?

Im trying to find how to search an access 2000 table using VBA. Eg- input the id, search the table for that id, then return other data from that entry
 
Old September 21st, 2005, 06:51 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Open a connection to the current database
Open a recordset on the table WHERE [ID] = " wherever you are getting the ID from
Then,
If rs.RecordCount <> 0 Then
   rs.MoveFirst
   Take your data
End If

HTH


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Query to Search for a value in a table Vendirella SQL Language 0 October 10th, 2007 12:47 AM
Search for a client in a table lwager VB How-To 2 May 5th, 2006 01:16 PM
search a table which has a apostrophe in it crmpicco MySQL 2 August 10th, 2005 06:23 AM





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