Autopopulate fields in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aharding
    New Member
    • Sep 2006
    • 22

    Autopopulate fields in a form

    I would like to autopopulate fields in a form by choosing one value from a table and having the corresponding data filled in based on 'Library' tables I have made. I have been successful in building autolookup queries but do not know how to mirror this in a form. I am not experienced with Visual Basic...meaning I have played around in it but haven't been successful...if I have some guidance I am sure I could plug in the right fields to correspond with my data. Any help will be appreciated! Thanks.
  • comteck
    New Member
    • Jun 2006
    • 179

    #2
    I think this is what you are looking for. Try this:

    Open your form in design view, and open the properties. Assign the query to the Record Source of the form. Now when you add controls, such as textboxes, combo boxes, etc to the form, you open the properties for those controls, and click on the Control Source. You will have a list of all the fields for the query. Select one.

    Close and save the form.

    Is this what you're looking for?
    comteck

    Comment

    • aharding
      New Member
      • Sep 2006
      • 22

      #3
      Yes...That worked in its own form. Will this work in a more complex form? I want to autopoulate for just one part of the form based on a my query, but the rest of the report pulls from a table.

      On another note...I inserted a subform into my main form. When I enter data into the subform it stores the data in the table like it should. Is there a way to link the other data in the form (that pertains to all records in the subform) to store in the table for those each of those records as well?

      EX
      Main form
      A
      B
      C which all apply to the following records

      Subform
      D D1 D2 D3
      E E1 E2 E3

      and the table needs to show:

      A B C D D1 D2 D3
      A B C E E1 E2 E3

      Sorry this is a learning process for me...I have my Access books in front of me which have been very helpful but sometimes it is better to actually ask someone!

      Thanks!

      Comment

      • comteck
        New Member
        • Jun 2006
        • 179

        #4
        Are you trying to do a JOIN, where you have a form based on more than one table, or on a table and a query?

        comteck

        Comment

        • aharding
          New Member
          • Sep 2006
          • 22

          #5
          Ok..I figured out the autopop. Do you know how to link fields to enter data into a table?

          Thanks

          Comment

          • PEB
            Recognized Expert Top Contributor
            • Aug 2006
            • 1418

            #6
            In fact be carefull about this! Expect your primary keys and forign keys! :)

            :)

            Comment

            Working...