Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
This article applies only to a Microsoft Access project (.adp).
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
Name: cmdFilterProducts
Caption: Filter Products
On Click: [Event Procedure]
Private Sub cmdFilterProducts_Click()
DoCmd.OpenForm "Products", acNormal, , , acFormEdit, acWindowNormal
End Sub
CREATE PROCEDURE spProducts
@CatID int
AS
SELECT * FROM Products WHERE CategoryID = @CatID
RETURN
Private Sub cmdFilterProducts_Click()
DoCmd.OpenForm "Products", acNormal, , "[CategoryID] = " & Me!CategoryID, acFormEdit, acWindowNormal
End Sub
CREATE PROCEDURE spProducts
AS
SELECT * FROM Products
RETURN
Keywords: kbprb, kbnofix, kbclientserver, kbaccess10ready, accrtmpublic, kboffice2003yes, kbprogramming, kbbillprodsweep, kb, kbsweptsoltax, kbvba, kboffice12yes, kbfreshness2007, kbswept