Results 1 to 8 of 8
  1. #1
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36

    Insert drop-down list in Parent Field in a form

    All,



    Please download compress zip folder to view Powerpoint file for instructions. I am trying to figure out a way to insert a drop-down list in a parent form (Person) in the Person form if it is possible. If inserting a drop-down list in the Person field is not possible, I am looking for other options. I have the access file in the zip folder and the instructions in text and visual on slide 1 of the Powerpoint file. I am using Access 2010 I will be waiting for your reply.

    Thank You
    Attached Files Attached Files

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    You need to confirm some things for me, to make sure I understand what you're trying to do, here. Are all of the statements below true?

    1. The Person Form is based on the Person Table?
    2. You want a Combobox, on the Person Form, to replace the 'Person' Textbox, and to allow you to select names from?
    3. The source for this Combobox has to be the Person Table?
    4. The Person Field is the Primary Key for the Person Table?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36
    Linq,

    Answer to question 1 - The Person textbox in the Person form is from the Person table. the activity and quantity textboxes in the subform is from the Main table.
    te
    Answer question 2 - If there is no possible way to create a drop-down list in the Person textbox, then a combo box will be sufficient.

    Answer question 3 - The source for the Combobox for the person textbook will come from the Person Table.

    Answer question 5 - yes, the Person field is the primary key for the person table.

    Thank you for your reply and time. Since I am new in Access, I really appreciate your assistance.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    The only thing close to a 'drop-down list for a Textbox' is a Combobox.

    So you want a dropdown list of persons, from the Person Table, to enter the names of persons, into a Form that is going to write it back to the Person Table, and the Person Field is the Primary Key of said Person Table...no can do! A given Value for the Primary Key of a Table can only appear in the Table one time! And since the Combobox has to draw its names from the Person Table, a person's name will already be in the Table, if the name is to appear in the Combobox, and cannot be used again! Get it? If the person's name is in the Combobox, they have already appeared in the Table and cannot do so again!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36

    Found a resourceful website

    Quote Originally Posted by Missinglinq View Post
    The only thing close to a 'drop-down list for a Textbox' is a Combobox.

    So you want a dropdown list of persons, from the Person Table, to enter the names of persons, into a Form that is going to write it back to the Person Table, and the Person Field is the Primary Key of said Person Table...no can do! A given Value for the Primary Key of a Table can only appear in the Table one time! And since the Combobox has to draw its names from the Person Table, a person's name will already be in the Table, if the name is to appear in the Combobox, and cannot be used again! Get it? If the person's name is in the Combobox, they have already appeared in the Table and cannot do so again!

    Linq ;0)>
    FYI - I found a website that helped me create a combo box to link the parent form to the child form. http://www.datapigtechnologies.com/f...tomfilter.html . Thanks for your reply and assistance.

    Haleakala17

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Three things:

    1. You do not need a Combobox to link a Parent Form to a Child Form; you simply use the Subform Control's Link Master Fields/Link Child Fields Properties.
    2. If the Person Field in the Person Table is the Primary Key, as you've said, you cannot retrieve names from the Person Field, via the Combobox, to enter those names in the Person Field by way of the Form! A given Value can only appear in a Primary Key Field of a Table one time! Access will not allow a given Value to be entered in a PK Field twice!
    3. The Combobox demonstration at the link has absolutely nothing to do with the question you posed here! It deals with using a Combobox to Filter a Form.


    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Haleakala17 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    36

    Reply

    I agree, I understand the parent and child form is linked however you cannot use a drop-down filter in a parent form because my person field has a primary key. I went to the website I sent you previously to create a Combo box for the person field which allowed me to select activities and enter the value of percentages that had updated the Main table.

    I appreciate your time and assistance in this matter.

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Good luck with your project!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 3
    Last Post: 10-03-2011, 02:33 PM
  2. Replies: 1
    Last Post: 08-11-2011, 11:17 AM
  3. Referencing drop down list from form
    By akyramid in forum Queries
    Replies: 1
    Last Post: 03-01-2011, 05:36 PM
  4. Replies: 2
    Last Post: 02-13-2010, 01:54 PM
  5. Open Form with a drop down list box
    By Rinehart in forum Forms
    Replies: 0
    Last Post: 08-10-2008, 08:53 PM

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