Results 1 to 2 of 2

Thread: Combo Box triva

  1. #1
    Join Date
    Feb 2003
    Location
    Winston-Salem,NC
    Posts
    34

    Question Unanswered: Combo Box triva

    I need a little help. I am creating a form that will update a table. What I need this form to do is allow a user to pick an application from a combo box which is linked to a table full of applications, from here I would like the next combo box to only show the responsibilities that can be granted with that application (currently it shows all the responsibilities from all the different applications), this data is in the same table. I don't know anything about VBA but from what I know from VB I think this could very easily be done.

    The way I am getting the data to show up in the combo boxes is by putting the following statement in the row source properties field

    SELECT DISTINCT [GROUPS].[APPL] FROM GROUPS;
    (this is for the Application)

    SELECT DISTINCT [GROUPS].[RESPON] FROM GROUPS;
    (this is for the responsibility)


    Any help would be great,
    Thanks

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    pick an application from a combo box which is linked to a table full of applications, from here I would like the next combo box to only show the responsibilities that can be granted with that application
    To do this we need to query the second combo box based on the first. Lets say that combobox1 is called cboApps, the second combobox SQL statement might look something like:

    Select ID,Apps,Respons from tblRespons
    Where Apps = Me.cboApps

    You will need an SQL something like the airware above to make this work then in the after update event of cboApps we would place some code like:

    Me.cboRespons.Requery

    That is it.

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •