Control on subform / combo box requesting parameter

Access Discussion in 'Microsoft Office' started by Barrie Brown, Feb 16, 2017.

  1. Barrie Brown

    Barrie Brown

    Feb 16, 2017
    Likes Received:
    I am a Newbie in Access and have the following in my database
    frmQuoteDetails which contains two combo boxes,
    CategoryID with Control Source = CategoryID, Row Source = SELECT [tblCategory].[CategoryID], [tblCategory].[Category] FROM [tblCategory] ORDER BY [Category]
    Additionally on the CategoryID combo box is this AfterUpdate event procedure:

    Private Sub CategoryID_AfterUpdate()
    Me.ProductID.RowSource = " SELECT ProductName From tblProducts WHERE CategoryID = " & " Me.CategoryID "
    Me.ProductID = Me.ProductID.ItemData(0)
    End Sub

    ProductID with Control Source and Row Source both empty, and Row Source Type as Table/Query.

    On running the After Update procedure I get "Enter Parameter Value for Me.CategoryID

    I would appreciate any assistance
    Barrie Brown, Feb 16, 2017
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.