Access data retrieval from a table to a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lisablair1980
    New Member
    • Feb 2012
    • 1

    Access data retrieval from a table to a form

    Hi All,
    I want to create a table that has a list of Head Teachers (HeadTeacher,)a list of schools (SchoolName)and then the address of the school (SchoolAddress) .
    Then I want to have a dropdown box or a combo box to select the schoolname and have it insert the associated address into a text box or the combo box if it will fit, and the head teacher into another text box.

    The only problem is that I have to have the address as a memo because the 55 characters in the text field is not enough.
    Is this possible to do?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32645

    #2
    The first point to consider is that TextBox controls and, particularly, Text fields, can handle more than 55 characters. It's an unusual address indeed that cannot fit within both. That said, addresses are rarely stored in a single field anyway, nor should they be in most cases.

    As for ComboBox controls, they can have multiple columns, although only one value. It's perfectly possible to populate other controls with the values of the other columns from the ComboBox, but I suspect what you really want is a properly designed form bound to your table which has controls for each of the fields and a separate (unbound) ComboBox control which is used to set a filter to enable selection of the relevant record on your form.

    Instructions and an example of how to do this can be found at Example Filtering on a Form.

    Comment

    • Mihail
      Contributor
      • Apr 2011
      • 759

      #3
      About 55 characters I wish to add that is a default setting and can be changed (as default) from Options.
      On the other hand you can set the number of characters in the field properties. As far as I know it accept up to 255 characters. But you can input an increased number (say 1 million) and Access will pop up a message with the maxim number of characters allowed (I hope).

      Comment

      Working...