Results 1 to 6 of 6
  1. #1
    YvonneFRB is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    3

    Text Box auto-populated using combo box not saving. Help!

    So I have a form where I want users to be able fill out some information and save it to a table.



    The fields I have in this form are [Name] , [District], [Location], and [Title]

    Name and Title are normal text boxes where the user can sinple type in whatever they want. However, District is a combo box and Location is a text box that is dependent on the selection of the District combo box.

    I want to make it so that depending on what is selected in the Districts combo box, the Location field is auto-populated.

    I'm able to do this by writing =Combo3.column(1) in the control source of the [Location] field.

    However...When I go to the table, I see that all the other fields were saved except the [Location] field which was auto populated.

    How do I get it to save in my table?? Ahh! Help!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    To start, you have redundant data in that table since "Location" can be derived from the District field. Is your [Location] control bound to a field in the ControlSource of that control?

  3. #3
    YvonneFRB is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    To start, you have redundant data in that table since "Location" can be derived from the District field. Is your [Location] control bound to a field in the ControlSource of that control?

    Sorry, I forgot to mention that in the combo box for [District], it's puliing a list of options from another table which supplies the distict and location pairings.

    it looks like: Distict 1, Location A..District 2, Location B... District 3, Location C and so on.

    So when I select district 1 in my combo box, I want my location to auto populate and save Location A.

    I got as far as getting it to auto populate but the results wont save to the table that the form is writing in to.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If your form was based on a query that joined those two tables on the District field then the Location field would auto populate without any help from you. I assume you have established the relationship of the two tables already.

  5. #5
    YvonneFRB is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    3
    The table that I'm using to save the form's info into isn't linked to any other tables right now. It's just where I'm trying to collect data.

    I figured from reading other posts that I should be using
    Me.TextboxName = Me.ComboName.Column(1) but I'm not sure where to write that

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That would go in the AfterUpdate event of the ComboBox. You would not be normalizing your tables using that method but it is your system.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 05-06-2011, 02:00 PM
  2. Issues with Auto populated fields
    By denise1005 in forum Queries
    Replies: 3
    Last Post: 03-17-2011, 10:50 AM
  3. Replies: 1
    Last Post: 01-21-2010, 02:36 AM
  4. Auto Populated Field not Saving to Table
    By EstesExpress in forum Forms
    Replies: 4
    Last Post: 10-09-2009, 03:33 AM
  5. Access 2000 Auto Populated Fields
    By Cylena in forum Access
    Replies: 1
    Last Post: 05-18-2009, 07:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums