Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to call a function from another function

    How to call a function from another function

    I have a function called Summary, which in its simplest form opens a report.
    what i want is to build another function, defining the Criteria,
    and call this function from the funcion summary
    -------------------------------
    Public Function summary()
    DoCmd.OpenReport "R1", acPreview, , StrCriteria
    End Function
    --------------------------------------------
    Public Function sizing(Gebinde)
    Dim StrCriteria As String
    If Gebinde = 1 Then
    srtCriteria = StrDrums
    End If
    End Function
    -----------------------------------------------
    Gebinde is a control on a form, and strDrums is a constant

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to call a function from another function

    Like this:

    DoCmd.OpenReport "R1", acPreview, , sizing(Gebinde)


    Public Function sizing(Gebinde) as string
    If Gebinde = 1 Then
    sizing = StrDrums
    else
    sizing = ""
    End If
    End Function


    Bart

Posting Permissions

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