Results 1 to 4 of 4
  1. #1
    mjj4golf is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Raleigh North Carolina
    Posts
    9

    Multiple combo boxes not being updated.


    I have two tables, the first one is a student table and the other one is the parent table. Both of them have a phone number field and are linked using those fields and the phone number field is the primary key in the parent table. There can be more than one student for a parent. I I use all the fields in both tables to make a select query for use in a form.
    In the form, I create three combo boxes – – one for the ID, another for phone number, and one the last name. When I bring up the form, the ID is blank and the last name may be or may not be correct. When I use a combo box for the ID and then pick and ID, the rest of the fields are then brought up correctly once in a while but can't depend on it. The inner combo boxes do not bring up any of the corresponding fields correctly. I do use a me.requery in the field(s) afterupdate
    I'm not sure what I'm doing wrong but can somebody point me in the right direction?
    Mike

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    It would be my impression that each table should have a form. Then one form should be inset into the other as a sub form. It is not clear to me whether you wish to begin in looking up the student - and getting the parent information as the sub form.....or begin with the Parent and get the Students info as the sub form. So that can go either way depending on how you wish to present information.

    In the main form - in its header - you use comboboxes to select which record to view in the main form (and the sub form information is automatic). Add those combo boxes separately and follow the wizard set up.

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Are the combo boxes bound to fields in the form recordsource query or table? If they are, then selecting a combo box value doesn't do a search, it changes the value in the underlying table field (which is probably what you don't want to do). If you want to use combos for searching, then they should not be bound to a field. You would use a little VBA in the after update event of the combo box to locate the required record.

  4. #4
    mjj4golf is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Location
    Raleigh North Carolina
    Posts
    9
    The form I have created uses a query it that uses the student and the parent table. The students are on top of the page and their parent are at the bottom. The parent is not in a subform but just contains fields from the query. I wanted the combo box to choose this student and the rest of the form would be filled in with the proper information from record in the query which is pointed to by the combo box selection. I tried using the after update and I did a re-query but that did not work. So I guess I'm confused on what I need to put in the after update property. I guess I'm just confused. Do I have to do a search or what? I work with access a long time ago but I guess I forgot how to do this. Thank you for your help.

    Mike

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

Similar Threads

  1. Replies: 5
    Last Post: 09-22-2016, 08:42 AM
  2. Filter with multiple Combo boxes
    By dotcanada in forum Access
    Replies: 3
    Last Post: 09-01-2016, 01:19 PM
  3. Using Multiple Combo Boxes
    By adamjon92 in forum Forms
    Replies: 1
    Last Post: 02-05-2016, 03:55 PM
  4. Multiple dependent combo boxes
    By anunat in forum Forms
    Replies: 15
    Last Post: 07-09-2012, 03:09 PM
  5. using multiple combo boxes in one form
    By quandore in forum Access
    Replies: 5
    Last Post: 01-30-2012, 03:03 AM

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