Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    MainReport Name: rpt_GCO 09 - Seminars - 01 Master
    subReportName: rpt_GCO 09 - Seminars - 02 Details
    subReport Control name on Main Report: subRepDetails
    text box in subreport containing data: txtSemDateName

    Do not want to print a line if date in text box not equal 27-Oct-09

    I tried:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Cancel = (Me.[txtSemDateName] <> "27-Oct-09")
    End Sub

    and got

    Runtime error 94,

    Invalid use of null

    I thought I was going in the right direction, but . . .

    Would appreciate any help with this

    ps. I couldn't even get my title correct. Do not print on UNEQUAL condition
    Cheers,
    Andy

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

    Cancel = (Me.[txtSemDateName] <> "27-Oct-09")

    to

    Cancel = (Nz(Me.txtSemDateName, "") <> "27-Oct-09")

    If txtSemDateName contains real date/time values, try

    Cancel = (Nz(Me.txtSemDateName, #01/01/1900#) <> #10/27/2009#)

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='797382' date='11-Oct-2009 16:47']Try changing the line

    Cancel = (Me.[txtSemDateName] <> "27-Oct-09")

    to

    Cancel = (Nz(Me.txtSemDateName, "") <> "27-Oct-09")

    If txtSemDateName contains real date/time values, try

    Cancel = (Nz(Me.txtSemDateName, #01/01/1900#) <> #10/27/2009#)[/quote]

    Excellent! Thanks very kindly Hans, and a Happy Canadian Thanksgiving to you,
    Cheers,
    Andy

Posting Permissions

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