Results 1 to 8 of 8
  1. #1
    gdboling
    Guest

    Auto Complete Help

    Access 2000

    I have several fields in my table and am using a form to fill them in. One of the fields is Name and there are other fields on the table that will be the same for the same name. And other fields will be different.
    Example:

    Name: Han Solo------------------when this is entered
    Desc: Frozen Carbonite------------------new data
    Affiliation: Light---------------auto fill in
    Home Planet: planet-------------------auto fill in
    Appraisal Value: $3.00-----------------new data

    Does anyone know the code to auto fill in those fields when the name is entered so you don't have to fill in a lot of repeat data.


    I already have a dynamic look up list for the name using a NotInList function.

    P.S. I don't want to use an 'add customer' type of form if I don't have to. I would like to pull the info from the table where the data is already stored for that name.

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Complete Help

    I'm not certain I understand your question but, are you saying "Affiliation" and "Home Planet" are already known for Name:"Han Solo" ? If that's the case, you shouldn't create a field in this table, simply link to the existing table. Or am I missing something. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  3. #3
    gdboling
    Guest

    Re: Auto Complete Help

    That might work, but it actually needs to create a new record in the table. Let me see if I can clerify:

    Name-------------Han Solo
    Description------Carbonite
    Affiliation------Light
    Price------------$3.00

    Ok, now I enter Han Solo in the name field of the form. Then I tab to the next field and fill in the description. Then I tab to the next field. Affiliation for Han Solo will always be Light (a good guy) so that should auto fill in because Han Solo exists in the Name Field(So I don't have to type in every time). I tab to Cost and fill that in and then click to go to a new record At that point the Han Solo record is added to my Table. I need every instance of Han Solo to have the values for the other fields. If I link them, will it still create a unique record in the table?

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Complete Help

    From what you describe, you need to carefully consider the construction of your project before you begin creating forms/reports.
    Although I am a Star Wars fan, I have a hard time getting my head around your analogy.
    Let me put it into what is for me a real world scenario. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    It sounds like you are building a database to track inventory with (in your example) description, cost, product type and Location.
    What you need to do in "My" analogy is to start with three separate tables:

    A table to contain all possible Type information in your example "Light"

    A table to contain all possible Location information in your example "Planet"

    And finally your basic table containing any number of (Can I call them Products) in your example Han Solo. This table would have specific values for Han Solo including a field for Cost $ 3.00 and a field for Description "Frozen Carbonite" Also assign a Unique Primary Key, I'd suggest using an autonumber.

    Now you set up relationships between the various tables linking the unique Basic Table to the other Type and Location tables.

    When you first create the "Basic" record through an input form you select the corresponding Type and Location (you can select these in many ways commonly combo or list boxes).

    When addressing a given "Basic Record" in a future form or report, the relationships exist.

    I hope that helps some.

  5. #5
    gdboling
    Guest

    Re: Auto Complete Help

    That would work except for do you know how many planet exist in the Star Wars universe? I am making this for a friend of mine who has about 900 action figures. That does not include ships and androids and aliens, etc. I need it to be more dynamic than creating tables containing data. The table for Affiliation woulnd't be too bad, basically you would have light, dark, and neutral, but Home Planet would not work that way. I thought about doing how you suggested it, but it seemed pointless for me to enter the data and then him to go back and enter some data. I think the user should just be able to enter all the data. I should probably write the DB is C or something huh. lol

    Thanks for your help though.

  6. #6
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Complete Help

    Ok, you've got me spun <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15> you said "autofill" You don't need "C" or DBase just create a planet field in the same table your entering "Han Solo" and any other fields you want <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  7. #7
    gdboling
    Guest

    Re: Auto Complete Help

    Ok, I think I have really confused everyone that is trying to help me. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>. I'm getting some real good advice but not for my problem. LOL. Let me see if I can get pretty specific.

    I have the follwing fields in my "ActionFigures" Table
    Name-------------ComboBox running a notinlist procedure
    description------text
    Affiliation------Text
    Home Planet------Text
    Value------------Decimal
    Notes------------Text

    Ok, now, I have a Form called ActionFiguresForm that I use to enter data into the table. When I enter a name into the Name field on the Form I want the program to look at the Table "ActionFigures", and see if that name is on there. If it is, I want the Affiliation and Home Planet to automatically fill in with the appropriate information inside the Form for that Name. It should aquire the information from the same record in my ActionFigure Table.

    Make sense yet?

  8. #8
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Complete Help

    create a query with the fields Name, description, Affiliation, Home Planet, Value, Notes
    now set the criteria of the name field in the query to the combo box in your form
    then on the on click of the combo box run the query

Posting Permissions

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