Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    35

    Unanswered: what is it called.....

    when i enter info into one field, based on that value, information is entered into another field?

    For example... field 1 has a persons name, Robert Smith
    when I type in Robert Smith, field 2 should automatically put in his phone number which would be in another table. Is this just a basic relationship and I'm making it out to be more than that or is there another way to do that?

    Thanks for any info.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    lookup

    This is commonly done using a combo or listbox
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Posts
    35
    I thought those obtions (combo and list boxes) were just drop downs where the user chose a value. Maybe I'm not explaining myself correctly. I want something like:

    If field A = X, then the value of field B = Y and the value Y is entered automatically. Would it be an "auto-fill"?

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    No, that would be a lookup.

    When the value of object A = X, then "lookup" the corresponding Y value and put it in object B

    Whether it's a text box, list box, combo box or other object is irrelevant.

    You could also use the filter property for your form depending what you want to do.

    Most people use combo boxes in this situation so the user can either begin typing a name and everything else will be "autofilled", or select from a list.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Sep 2004
    Location
    Kuala Lumpur
    Posts
    60

    a different tack...

    You wrote:
    " I thought those obtions (combo and list boxes) were just drop downs where the user chose a value. "
    ---
    That's exactly what they are and it sounds like that's what you want.

    Maybe you figured it out from teddy's responses, but just in case, maybe this will help (i'll use queries and a macro):

    If you have a form based on a table (or query of a table) called PEOPLE, then all of your data should be available via the form, yes? (Your form should include the PK of the table). But to find someone you have to go from record to record which is a drag. So you want to find someone by simply typing in a name. So...

    Add an UNBOUND combo box (or list box) called (something like) cboNames to the form. The row source should be a query of all Names from the PEOPLE table so when you 'dropdown' you see everyone's name.

    The query must include the PK of tblPEOPLE, and the Name field(s).

    Now you need a macro called (something like) AfterUpdateNames:

    Action Argument

    GoToControl [PK Field of Form]
    FindRecord =[cboNames]

    Attach the macro to the After Update event of cboNames.

    Here's hoping.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •