Results 1 to 2 of 2
  1. #1
    mpbertha is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    1

    ComboBox Row Source Value

    I have a form which has three combo boxes:



    1) Category (Combo0)
    2) SubCategory (Combo7)
    3) Object (Combo9)

    Combo0 has its rowsource set to a query. The afterupdate event in Combo0 determines the rowsoure of Combo7 using this code:

    Me.Combo7.RowSource = "select distinct object.subcategoryname from object where categoryname = '" & Combo0.Value & "'"

    The afterupdate event of combo 7 will determine the rowsource of combo9 using this code:

    Dim strSQL As String
    strSQL = "select object.objectname from object where object.category = '" & Combo0.Value & "'" & _
    " and object.subcategory = '" & Combo7.Value & "'"

    Me.Combo9.RowSource = strSQL

    So I open the form, make my selection in Combo0, this populates Combo7 successfully. However, when I make my choice in combo 7 I get a

    "Enter Paramter Value" promp asking for object.category

    It seems that it is not taking the category (Combo0) value.. any help is appreciated.

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    For a start I would not use the word Object to describe the name of a recordsource. If this is a table then rename the table. You need to look at naming conventions and reserved words.

    David

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

Similar Threads

  1. Replies: 2
    Last Post: 07-30-2009, 08:02 AM
  2. Forms' Record Source
    By Progress2007 in forum Programming
    Replies: 11
    Last Post: 07-27-2009, 11:04 AM
  3. Control source and calculated values
    By meistersteff in forum Forms
    Replies: 0
    Last Post: 11-23-2007, 07:04 PM
  4. Changing the record source in a form
    By lmichaud in forum Forms
    Replies: 1
    Last Post: 07-09-2006, 09:20 AM
  5. Replies: 2
    Last Post: 04-17-2006, 08:13 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