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

    2 Combo boxes and 1 textbox autopopulate

    I am very furstrated. I need to populate a field (Time) based off the selection of two different combo box. The first combo box (Tasks) finds all the tasks once selected based on the selection the second combo box populate related data to that criteria. Now I need the text field (Time) to populate based on both selections made. I will be disabling this field so that users only see the time and cannot change it. Can anyone help me out? Here is my setup and how it works so far.



    I have 2 tables.

    Details
    DetailsID
    CoachName
    DateEntered
    Division
    Task
    SubTask
    Time
    QuantityOfTask
    Comments
    OnSiteLocation
    Grief

    CombinedTaskServices
    TaskID
    ProjectName
    TaskName
    Bucket
    Quantity
    Unit
    Time
    OperationalDef

    3 Queries

    MasterQuery
    SELECT DISTINCT CombinedTaskServices.ProjectName
    FROM CombinedTaskServices;

    SlaveQuery
    SELECT DISTINCT ProjectName, TaskName
    FROM CombinedTaskServices
    WHERE ProjectName=forms!frmMain.cboProjectName.value;

    TaskTimes
    SELECT DISTINCT ProjectName, TaskName, Time
    FROM CombinedTaskServices WHERE ProjectName=forms!frmMain.cboProjectName.value AND TaskName=forms!frmMain.cboTaskName.value;

    Form

    frmMain
    Has all items on it from Details table. Both the Task and SubTask are combo boxes. The time is a text field.
    I have programmed the Task combo...
    Private Sub cboProjectName_Change()
    Me.cboTaskName.Requery
    Me.cboTaskName = ""
    End Sub
    Rowsource is:
    SELECT MasterTasks.ProjectName FROM MasterTasks ORDER BY [ProjectName];
    SubTask Rowsource is:
    SELECT SlaveTasks.TaskName FROM SlaveTasks ORDER BY [TaskName];
    Thanks!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,730
    Watch this free video re cascading combo boxes.
    http://www.datapigtechnologies.com/f...combobox2.html

    It should give you some ideas.

  3. #3
    csjackson is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2011
    Posts
    2
    Thanks you! I have got it now.

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Help with combo boxes?
    By 107295 in forum Access
    Replies: 5
    Last Post: 02-09-2011, 01:03 AM
  3. Replies: 2
    Last Post: 09-17-2010, 09:53 AM
  4. change textbox value after combo update
    By arctushar@yahoo.com in forum Forms
    Replies: 5
    Last Post: 09-06-2010, 07:17 PM
  5. Replies: 3
    Last Post: 03-28-2009, 06:06 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