Results 1 to 2 of 2
  1. #1
    CoreyBuchan is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3

    Problem creating a search, in Microsoft 2007

    Firstly I am using Microsoft Access 2007



    I am currently trying to build a database that can search through specific lessons learnt for a company. I have started by building a table, which includes Title, Project, Date, Summary, Category, Attachments and Key Words. Next I created a split form called Lessons Learnt List, which includes the table and at the top has a button called new lesson. When this button is pushed it is linked to another form which pops up and is called Lessons Learnt Details which allows new lessons learnt to be added to the table. The save and exit button work fine. A new form was created called Lessons Learnt Search, this is where I am having the problem. I have created a text box and linked it the table and then created a button. The button has been given the code:



    Private Sub Search_Click()

    If IsNull(Title) = False Then
    Me.Recordset.FindFirst '[Title]=' & Title
    Me!Title = Null
    If Me.Recordset.NoMatch Then
    MsgBox "No record found", vbOKOnly + vbInformation, "Sorry"
    Me!Title = Null
    End If

    End If

    End Sub

    This is displaying an error, can someone tell me where I have gone wrong? What I want in this search form is the ability to type the Title, Project, Date, Key words and Category, or just one of the following and push the search button which would bring up the results on the Lessons Learnt List Form. The format I would prefer would be

    Title: (then a blank box to type)
    Project: (then a blank box to type)
    etc

    If there is a better way to do it, how do I do it?

    Also the next thing I would like to do is have the ability in the search to type in part of a word, or just a single key word which would bring up the results? I saw somewhere this was done by using a *(and then the characters) before pushing a search button.

    If not how would I do a search and list for my table, as in when I start typing the results start showing matches etc.

    Thanks Very Much, Hope I was clear enough. If anything is unclear let me know!

    Cheers

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    What is the error message?

    Here is technique using the * wildcard to filter form http://datapigtechnologies.com/flash...tomfilter.html

    However, it does show filter with date fields. That may be a bit tricker because don't think wildcard will work with date fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 07-29-2011, 11:43 AM
  2. Microsoft Access 2007 - 2010 Compatibility
    By AccessFreak in forum Forms
    Replies: 4
    Last Post: 01-05-2011, 07:57 PM
  3. Replies: 3
    Last Post: 06-22-2010, 07:49 AM
  4. Developer Option in Microsoft Access 2007.?
    By aligahk06 in forum Forms
    Replies: 1
    Last Post: 04-23-2010, 01:44 PM
  5. microsoft access 2007 video tutorials
    By jamesdean in forum Access
    Replies: 0
    Last Post: 06-08-2007, 08:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums