Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2011

    Unanswered: possible to filter form using combobox?

    I'm trying to use an unbound combo box in a switchboard form that will
    allow a user to open the main data entry form based upon the values
    presented in the combo box.

    cboMapMethod reads from SELECT [tlu_Map_Method].[OBJECTID],
    [tlu_Map_Method].[Description] FROM tlu_Map_Method;

    where the bound column is two columns, column width is set to 0";1",
    and tlu_Map_Method.Description is a text field.

    The code I am using is:
    Private Sub cboMapMethod_Click()
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Rare Points"
    stLinkCriteria = "[MapMethod]= " & Chr(34) & Me![cboMapMethod] &
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    End Sub

    When I manipulate the combo box from the switchboard form, I can
    select values but nothing executes on click, the form doesn't open

  2. #2
    Join Date
    Oct 2009
    well I think you need to move the code to the AfterUpdate event

    and then syntax change:

    stLinkCriteria = "[MapMethod]= " & Me.[cboMapMethod]

    give that a try.
    www CahabaData com

Posting Permissions

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