Results 1 to 2 of 2

Thread: Syntax Help

  1. #1
    Join Date
    Jul 2004

    Unanswered: Syntax Help

    I have a command button below a combo box. When the right choice is chosen I'd like to be able to click the command button and open a form already populated with the values from the combo box on the other form.

    Here is the code

    Private Sub Command19_Click()
    On Error GoTo Err_Command19_Click
        Dim stDocName As String
        stDocName = "feed"
        DoCmd.RunMacro stDocName, acPreview
    Form_frmOutboundSearch.Combo22.Value = Form_feed.FeedOutboundID
        Exit Sub
        MsgBox Err.Description
        Resume Exit_Command19_Click
    End Sub
    It's opening the other form, but not populating the fields with the value chosen in the combo box.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    What is your macro doing? Is there a reason you're not using OpenForm? If you used DoCmd.OpenForm, you could pass the combo box value as part of the where clause.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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