Results 1 to 4 of 4
  1. #1
    yosteee is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    5

    Cascading Combo box and populated txt boxes do not display previous selected items

    I have a Form that seems to be working correctly except for this one item. I must be missing something.
    First combo box selects the CustomerID. 2nd cascading combo box shows contacts based on combo box 1. and populated text boxes show the contact information such as phone numbers and email address. All this works correctly while I stay on that record. Also, the table is updated correctly for the Form.
    When I move off of the record to create a New Record and move back to a previous record, combo box 1 still shows what was selected, but combo box 2 and the populated text boxes are blank. I want to move to previous records and see what currently is recorded in the table.
    I am a first-timer to this (or any) access forum. I hope I have posted to the correct location, and have explained it adequately.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    are the combo boxes bound to the table?
    are the combo boxes queries, looking at other combo boxes to pull data?

  3. #3
    yosteee is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    5
    Combo box 1 (Name=cboCustID) is bound to CustID (Control Source = CustID) which is a numeric field in the table that my Form is tied too (tblRoutineRepair).

    Here is what I have for the Row Source= SELECT Company.ID, Company.[Full Name] FROM Company INNER JOIN [Company Catagory LookUp] ON Company.[Catagory LookUp] = [Company Catagory LookUp].ID WHERE ((([Company Catagory LookUp].Catagory)="Customer")) ORDER BY Company.[Full Name];

    The Company Catagory Look Up is used to separate Customers, Suppliers and Insurance Providers in the Company table. This is working correctly.

    Combo Box 2 (Name = cboCustContact01) is to reflect/ show the Contacts are with the Customer selected in Combo Box 1. Combo Box 2 is bound to CustContact (Control Source = CustContact) which is a numeric field in the table that my Form is tied too.

    Here is what I have for the Row Source= SELECT qryCustContact.ID, qryCustContact.ContactFName, qryCustContact.[Company LookUp], qryCustContact.[Work Phone], qryCustContact.Extension, qryCustContact.Mobile, qryCustContact.Fax, qryCustContact.Email1 FROM qryCustContact WHERE (((qryCustContact.[Company LookUp])=[Forms]![frmRoutineRepair]![cboCustID])) ORDER BY qryCustContact.ContactFName;

    Here is what I have for the Event for Combo Box 2
    Private Sub cboCustContact01_Change()
    Me.txtCustCPhone.Value = Me.cboCustContact01.Column(3)
    Me.txtCustCPhoneExt.Value = Me.cboCustContact01.Column(4)
    Me.txtCustCMobil.Value = Me.cboCustContact01.Column(5)
    Me.txtCustCFax.Value = Me.cboCustContact01.Column(6)
    Me.txtCustCEmail.Value = Me.cboCustContact01.Column(7)
    End Sub

    Phone: is one of text boxes I am trying to auto fill based on the selection in Combo Box 2. It is Unbound and its name is txtCustCPhone.

    Again, This all works while I stay on the current record, but when I move off the record and return, Combo Box 2 and the Auto fill text boxes are blank.

    Here is an image of the Form
    Click image for larger version. 

Name:	Clip.jpg 
Views:	8 
Size:	192.6 KB 
ID:	30860
    here is a screen shot of my Relationships
    Click image for larger version. 

Name:	Relationships.jpg 
Views:	8 
Size:	223.3 KB 
ID:	30861

    Your quick response was much appreciated, Sorry for the delay in responding. I wear many hats where I work and this database sometimes is not the highest priority.

  4. #4
    yosteee is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    5
    I believe I have solved it. In the table for the Form, the fields that I wanted to store the Contact Phone etc was a numeric field. I changed it to a text field and it appears to be functioning correctly. I will continue to work at this and mark this post solved once I confirm my findings. Thanks for pointing me in the right directions.

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

Similar Threads

  1. Replies: 1
    Last Post: 03-17-2015, 03:59 AM
  2. Replies: 1
    Last Post: 02-04-2015, 03:12 PM
  3. Replies: 5
    Last Post: 10-07-2014, 11:53 AM
  4. Replies: 11
    Last Post: 08-06-2014, 09:47 AM
  5. Replies: 1
    Last Post: 03-27-2010, 06:13 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