+ Reply to Thread
Results 1 to 2 of 2

Thread: Access Search box via VBA

  1. #1
    Registered User
    Join Date
    04-09-2011
    Location
    Wyoming, USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Access Search box via VBA

    I successfully created a form and a search box within Access using a VBA code. I am tasked with performing another search but now each unique identifier has multiple data associated with them that I need identified in my search form. Does anyone know how I can update the code to show these changes?

    Thanks for the help.

    Code:

    Private Sub Form_Load()
    DoCmd.Restore
    End Sub
    Private Sub cmdSearch_Click()
    Dim strWinsRef As String
    Dim strSearch As String

    Exit Sub
    End If
    '----------------------------------------------------------------------------

    'Performs the search using value entered into txtSearch
    'and evaluates this against values in strWins

    DoCmd.ShowAllRecords
    DoCmd.GoToControl ("strWins")
    DoCmd.FindRecord Me!txtSearch

    strWins.SetFocus
    strWinsRef = strWins.Text
    txtSearch.SetFocus
    strSearch = txtSearch.Text


    End If
    End Sub

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,155

    Re: Access Search box via VBA

    Take a look at this video and see if it answers your needs. If not, then post back.

    http://www.datapigtechnologies.com/f...earchform.html

    Alan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0