Results 1 to 6 of 6
  1. #1
    Datament is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2023
    Posts
    18

    Dependent comboboxes to use in updating a textbox in a split form

    Hello All,


    Please help as I already have a SPLIT form frm_Stores with a recordSource "tbl_StoreUpdates" which has the following 6 columns 1. col_Comp 2. col_Name 3. col_Type 4. col_State 5. col_Updated and 6. col_Worker. The first combobox cboComp was setup to populate columns 1 thru 4, and the dependent combobox cboUpdate was to be used for updating columns 5 and 6. All the


    I need the 2 comboboxes (Highlighted) to be part of the form's 6 controls "1. col_Comp" 2. col_Name 3. col_Type 4. col_State '5. col_Updated" and 6. col_Worker." and be visible on open.

    I already have cboComp pulling and populating controls 1 thru 4 as it was designed in the form. However, I need it to go and highlight the same row of record in the DATASHEET on bottom of the splitform. I know it is possible, but just couldn;t remember hoe to, and if anyone knows a good reference article or YouTube video on how to accomplish this I would greatly appreciate it!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by "populate columns"? Exactly how is that accomplished? Are these comboboxes and textboxes BOUND or UNBOUND? Are you using comboboxes to filter or go to record?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Datament is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2023
    Posts
    18
    Sorry for my wrong use of words. "Populate columns" I mean to use the first combobox to filter the record, and use the second combobox to update the last two fields col_Updated and col_Worker.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    A common method to go to a record without filtering is to use bookmarks, like:

    With Me.RecordsetClone
    .FindFirst "ID=" & Me.combobox
    Me.Bookmark = .Bookmark
    End With

    In a split form, that will show the desired record in single section as well as highlight in datasheet.

    If you want to filter, then set form Filter and FilterOn properties.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Datament is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2023
    Posts
    18

    Dependent comboboxes to use in updating a textbox in a split form

    Hi June7 - Please see the attached
    I would really appreciate it if you could assist with the attached database.

    I need the top combobox "cboCompany" to filter and show ONLY the row of the selected Company number to include Banker and Employee,

    Also, USE the second combobox "Banker" to change the Banker number and employee name as needed and save the changes.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Instead of repeatedly saving banker codes and employee names in tbl_StoreMaintenanceList, should have autonumber field as primary key in tbl_AssociatedBanker_Code then save that value in a number field as foreign key in List.

    Company field should be number and primary key. I found two companies with same number. Why is this not autonumber?

    Controls used to enter/select filter criteria must be UNBOUND. Put combobox in form header and use a textbox in Detail to display Company. Eliminate the filtering by Banker. Change code to remove apostrophe delimiters after changing Company field to number type.

    Company combobox properties:
    ControlSource: none
    RowSource: SELECT Company, LawName FROM tbl_StoreMaintenanceList ORDER BY LawName;
    BoundColumn: 1
    ColumnCount: 2
    ColumnWidths: 0;1

    Banker combobox properties:
    ControlSource: BankID_FK
    RowSource: SELECT BankID, Banker, Employee FROM tbl_AssociateBanker_Code ORDER BY Employee;
    ColumnCount: 3
    ColumnWidths: 0;.5;.5


    Expression in Employee textbox: =cboBanker.Column(2)


    Some LawName and StatName values have space at beginning.

    Set of controls on right side of form make no sense.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Dependent ComboBoxes
    By HansJ in forum Forms
    Replies: 3
    Last Post: 06-09-2016, 05:12 PM
  2. Replies: 4
    Last Post: 09-25-2015, 11:12 AM
  3. Dependent comboboxes and date picker
    By edmscan in forum Forms
    Replies: 4
    Last Post: 03-24-2014, 08:14 AM
  4. Replies: 7
    Last Post: 11-16-2012, 03:02 PM
  5. Replies: 2
    Last Post: 05-16-2012, 03:10 PM

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