Results 1 to 5 of 5

Thread: open another form in accordance with an id of combo

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    13

    open another form in accordance with an id of combo

    friends,
    I have a button on a form to open another form in accordance with an id of combo, put this code no longer works:

    DoCmd.OpenForm "formCadastroBásico2",,,,, acDialog, "CodEmpresa =" & Me.combEmpresa. [Column] (0)

    This other form is a one to one with the id of the combo. I am trying to open the second form when opening according to ID combo.

    Please can someone help me.

  2. #2
    Member
    Join Date
    Feb 2006
    Posts
    50

    Re: open another form in accordance with an id of combo

    Try this..

    Code:
    Dim frm As String
    
        Dim crt As String
        frm = "formCadastroBásico2"
        crt = "[CodEmpresa]=" & "'" & Me.combEmpresa. [Column] (0) & "'"
        DoCmd.OpenForm frm, , , crt
    
    End If

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    13

    Re: open another form in accordance with an id of combo

    Carbo, thanks for replying. unfortunately did not work. I post the db?

  4. #4
    Member
    Join Date
    Feb 2006
    Posts
    50

    Re: open another form in accordance with an id of combo

    Is this an MsAccess Database? if so 2000, 2003 etc.?
    Post your complete button code..

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2012
    Posts
    13

    Re: open another form in accordance with an id of combo

    the database is access 2007, the name of the button is cadastrobásico2, which is in the form fFiltros.




    http://dl.dropbox.com/u/53793430/BD%20ATUAL.accdb

Posting Permissions

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



Click Here to Expand Forum to Full Width