Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Auto Complete Fields

Discussion in 'Information Technology' started by DerekCraine, Jul 28, 2006.

  1. DerekCraine

    DerekCraine
    Expand Collapse
    Guest

    I am using three different forms for my database, one of which is for
    "personal information". I want some of the fields on the Personal Info form
    to repeat at the top of the other two forms, but i need them to "auto
    complete" as each of the other forms is designed to track multiple entries
    for the selected person. I'm not sure how to accomplish this. Any help
    would be greatly appreciated. Thanks.
     
  2. Loading...

    Similar Threads Forum Date
    Opinion Is Autocomplete Evil? Some Women Take A Hard Look at Google ! Breaking News Nov 7, 2013
    Sikh News AutoZone sued for firing Everett Sikh Breaking News Sep 29, 2010
    India Singh: Centre Ready To Give Kashmir Autonomy Breaking News Aug 11, 2010
    India Paste tariff cards behind driver’s seat: Transport dept to automen Breaking News Jul 21, 2010
    Gursharan Kaur: India's First Lady's Autobiography Sikh Personalities Jun 1, 2010

  3. Sprinks

    Sprinks
    Expand Collapse
    Guest

    Derek,

    It's hard to tell without information about the tables and/or queries your
    forms are based on, but "AutoComplete" raises a red flag to me--it suggests
    that you are attempting to *store* information from your PersonalInfo table
    into the RecordSources on which the other two forms are based. This is
    non-normalized design and bad practice. The only field that should be
    replicated in the other tables is the primary key of your PersonalInfo table
    (a foreign key).

    If, on the other hand, you already have normalized tables, and merely wish
    to *display* the fields from the PersonalInfo table, there are 2 ways to do
    it:

    1) Use a combo box Bound to the foreign key field. Set the RowSource to
    select the primary key & any other fields from your PersonalInfo tables. Set
    the BoundColumn to 1 to store the primary key in the foreign key field. Set
    the first column width to 0" so that the 2nd field displays in the drop-down
    list and after selection. If you enable the combo box wizard, it's very
    straightforward. Accept the default Hide Key Field (Recommended) when
    prompted.

    Then use the Column property of the combo box to display the other fields in
    textboxes. The index starts with zero, so to display the third column, set
    the textbox' ControlSource to = YourComboBox.Column(2)

    2) Base your form on a query that links the two tables by the
    primary/foreign key fields, and include those fields you wish to display.
    Don't include the primary key field from PersonalInfo or your query will be
    non-updateable; include the foreign key instead. Use textboxes to display
    the additional fields and a combo box for the foreign key.

    Hope that helps.
    Sprinks

    "DerekCraine" wrote:

    > I am using three different forms for my database, one of which is for
    > "personal information". I want some of the fields on the Personal Info form
    > to repeat at the top of the other two forms, but i need them to "auto
    > complete" as each of the other forms is designed to track multiple entries
    > for the selected person. I'm not sure how to accomplish this. Any help
    > would be greatly appreciated. Thanks.
     
  4. DerekCraine

    DerekCraine
    Expand Collapse
    Guest

    Thanks, Sprinks. I appreciate the help, and I'm running with it now.

    "Sprinks" wrote:

    > Derek,
    >
    > It's hard to tell without information about the tables and/or queries your
    > forms are based on, but "AutoComplete" raises a red flag to me--it suggests
    > that you are attempting to *store* information from your PersonalInfo table
    > into the RecordSources on which the other two forms are based. This is
    > non-normalized design and bad practice. The only field that should be
    > replicated in the other tables is the primary key of your PersonalInfo table
    > (a foreign key).
    >
    > If, on the other hand, you already have normalized tables, and merely wish
    > to *display* the fields from the PersonalInfo table, there are 2 ways to do
    > it:
    >
    > 1) Use a combo box Bound to the foreign key field. Set the RowSource to
    > select the primary key & any other fields from your PersonalInfo tables. Set
    > the BoundColumn to 1 to store the primary key in the foreign key field. Set
    > the first column width to 0" so that the 2nd field displays in the drop-down
    > list and after selection. If you enable the combo box wizard, it's very
    > straightforward. Accept the default Hide Key Field (Recommended) when
    > prompted.
    >
    > Then use the Column property of the combo box to display the other fields in
    > textboxes. The index starts with zero, so to display the third column, set
    > the textbox' ControlSource to = YourComboBox.Column(2)
    >
    > 2) Base your form on a query that links the two tables by the
    > primary/foreign key fields, and include those fields you wish to display.
    > Don't include the primary key field from PersonalInfo or your query will be
    > non-updateable; include the foreign key instead. Use textboxes to display
    > the additional fields and a combo box for the foreign key.
    >
    > Hope that helps.
    > Sprinks
    >
    > "DerekCraine" wrote:
    >
    > > I am using three different forms for my database, one of which is for
    > > "personal information". I want some of the fields on the Personal Info form
    > > to repeat at the top of the other two forms, but i need them to "auto
    > > complete" as each of the other forms is designed to track multiple entries
    > > for the selected person. I'm not sure how to accomplish this. Any help
    > > would be greatly appreciated. Thanks.
     

Share This Page