Results 1 to 8 of 8
  1. #1
    Rhubie is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    85

    Search Field on entry form

    I have a form to enter data, I would also like to have a search field on this form so that someone can also do search by lastname. I have tried to add a combo box - but it is not working.

    Can I have a search field on this same form? If so, how would I go about getting it to work?



    The information that I have found says to use the wizard and select "Find a Record on my form that is based on the value that I selected in the Combo Box"
    this does not show in the wizard in Access 2010.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    when the form is in design view; and you drag/add a combo box onto it - the wizard launches and provides 3 choices...the 3rd choice is what you need....

    if the wizard is not launching then you have some other issue - that may be as complicated as an installation problem or as simple as misunderstanding which icon is actually the combobox control....

    hope this helps

  3. #3
    Rhubie is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    85
    Thank you - I got it working - it must have been how I was dragging it - sometimes there are only 2 options. Can I sort the combo box list alphabetically and then can I clear the box if the person wants to enter a new record?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Rhubie View Post
    ...sometimes there are only 2 options...
    The third option only appears if the Form is Bound to a RecordSource. Unless the Form is Bound to the appropriate Table/Query and has Controls on it, to accept/display the retrieved data, the Access Gnomes have no way to automatically perform the task.
    Quote Originally Posted by Rhubie View Post
    ...Can I sort the combo box list alphabetically...
    The easy way would be to

    • Create a Query from the Table, using the Query Wizard
    • Go into the Query Design View and sort by the Field
    • Create your Combobox based on the Query rather than the Table.

    Many experienced developers always base Forms on Queries, even when there is only one Table involved. Queries make data manipulation easy (as in this case) and many feel that accessing the data through a Query, rather than directly through the Table, adds a layer of protection.

    Quote Originally Posted by Rhubie View Post
    ...can I clear the box if the person wants to enter a new record?
    Sorry, not sure I understand this. If you want the Combobox to reset, when the user goes to enter a New Record, something like this will do it. Simply replace ComboboxName with the actual name of yours:
    Code:
    Private Sub Form_Current()
     If Me.NewRecord Then
      Me.ComboboxName = Null
     End If
    End Sub


    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Rhubie is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    85
    Thank you

    If I add a new record - the value stays in the find search box (combo box) is there a way to clear that?

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Sorry, see my edited post above!
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Rhubie is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    85
    How can I tell if the Form is Bound to the Recordsource?

    Can I have multiple search fields on a form?

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    In Form Design View, go to Properties - Data; is there anything in the Record Source Property?

    You can search as many Fields as you want, but some may or may not be of any real use.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 09-20-2012, 11:23 AM
  2. Replies: 3
    Last Post: 08-22-2012, 03:28 AM
  3. Replies: 7
    Last Post: 08-08-2012, 03:28 PM
  4. Replies: 1
    Last Post: 06-27-2012, 12:35 PM
  5. Replies: 2
    Last Post: 06-08-2012, 11:22 AM

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