Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    synching forms (a2003)

    (Edited by HansV to insert <!t>[tab]<!/t> tags to preserve indentation in code - see <!help=19>Help 19<!/help>)

    I'm trying to synchronize two forms. The first form is frmConsumer. The second form is frmOrg which has an unbound list box (lstConsumers) showing all the consumers associated with the organization. Clicking a consumer in the list box puts its underlying primary key in an unbound txtBox (txtConsumerUbID).

    Clicking a consumer in the lstBox does put the appropriate value in the unbound text box. That's where it quits, however. It does not filter frmConsumer by the value in the unbound text box.

    Here's the code I have:

    Private Sub lstConsumer_Click()
    Me.txtConsumerUbID = Me.lstConsumer.value

    If IsOpen("frmConsumer") Then
    Forms!frmConsumer.Filter = "lngConsumerID=" & Nz(txtConsumerUbID, 0)
    End If
    End Sub

    Can you see what I'm doing wrong?

    E

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: synching forms (a2003)

    Try inserting the following line immediately above End If:

    Forms!frmConsumer.FilterOn = True

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: synching forms (a2003)

    Sweet! Worked like a charm.

Posting Permissions

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