Autocomplete of Form Text Boxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alxcy
    New Member
    • May 2007
    • 3

    Autocomplete of Form Text Boxes

    Hello ,
    Im new here and generally in the Database world, just started learning access
    while doing a little project.

    I created a normal Database in MS Access 2003 with one table and one form
    to insert data to the table. The form consists of Name, Surname , E-Mail .My question is , is there any command or feature that allows me to enable autocomplete on on my form text boxes?

    To be more specific. Lets say i have inserted 20 contacts and 3 of them have the name alex and one the name alexantra.
    What i want to do is when i use the form to insert data and lets say type al in the name text box ,there should appear a list of the names inserted already in my database that start by al so i can choose from the list the name i want to add.

    I checked numerous other threads and didnt find any similar threads to mine
    or info that could help me so i hope im not doublethreading or something if i am im sorry.

    Thank you in advance,

    alex
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    For this you can add a combobox based on a "Select distinct namefield from tblWithName".
    Just create a new field with the wizard and select the field needed.
    Next when the combobox is created, open the properties (button with hand and white sheet). Under the data-tab ad the "distinct" after the "select", thus no dupes will show.
    Finally add under the same tab the name of the field so it's bound (will change) in your table.

    Getting the idea ?

    Nic;o)

    Comment

    • alxcy
      New Member
      • May 2007
      • 3

      #3
      i've tried that before
      the problem is that if my new entry is not already on the list im not able to
      enter it because access classifieds my new entry as an invalid item not existing on the list.

      For example if i have a contact named Lucas and i didnt enter one from before
      i did the form with the list option for name surname and email then i cannot
      enter Lucas into the database bcause lucas is not in the list .

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32668

        #4
        Check the 'Limit to List' property of your control.

        Comment

        • nico5038
          Recognized Expert Specialist
          • Nov 2006
          • 3080

          #5
          To elaborate on NeoPa's comment:
          By default the LimitToList property should contain "No". When that's the case new entries can be added and a requery will show it the next time the combo is used.

          Nic;o)

          Comment

          • alxcy
            New Member
            • May 2007
            • 3

            #6
            thank you both for your replies :D

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32668

              #7
              Originally posted by alxcy
              thank you both for your replies :D
              No problem :)
              Did that help with your problem?

              Comment

              Working...