Wrox Programmer Forums
|
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 9th, 2003, 06:31 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dropdown search??

Hi I have a dropdown box with a SQL Query to list name, address etc. That will then populate the a form with that persons info.

My code has:

Private Sub Combo1_AfterUpdate()
    Me.RecordsetClone.FindNext "[MemberId] = " & Me![Combo1]
    Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

But, This only allows me to go forward in the records. If I need to choose a record before this it doesn't go there.

Anyone know How I should do this?

THanks!
 
Old July 9th, 2003, 07:24 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Never mind found the answer:

  ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[MemberID] = " & Str(Nz(Me![Combo45], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark






Similar Threads
Thread Thread Starter Forum Replies Last Post
New text search doesn't preselect search string planoie Visual Studio 2005 0 July 23rd, 2007 06:47 AM
How to integrate search function n dropdown box jun9nah ASP.NET 1.0 and 1.1 Basics 1 July 25th, 2006 06:51 AM
How to integrate search function n a dropdown box jun9nah VB.NET 0 July 24th, 2006 10:12 PM
Dropdown List search form [?] antonioluis Dreamweaver (all versions) 1 May 25th, 2005 01:10 AM





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