Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004

    Unanswered: Check box to Grey out Text Box on a Reprt

    I have a check box on a form next to 4 fields of addresses (line one, line two, line 3, line 4). When the check box is checked I want the 4 fields of address on a report to turn light grey in their boxes.

    Ive done it so they turn grey on the form, but need it on the report aswell so it can be printed out.

    My form name is - sentence_history_new
    The checkbox in the form is called NFA
    The address box on the report (and form) is - address_1

    The code I entered is -

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    If Forms("sentence_history_new").NFA.Value = True Then
    Address_1.BackColor = 12632256
    Address_1.BackColor = 16777215
    End If

    End Sub

    The above code was from a previous post, but it wont work. Any ideas why its not working?

  2. #2
    Join Date
    Oct 2003
    Provided Answers: 1
    When you open the report, your form must also be opend.

  3. #3
    Join Date
    Sep 2003
    Quote Originally Posted by hammbakka
    When you open the report, your form must also be opend.
    That is correct ... Now, the lovely thing about Access 2002 versus Access 2000 is that with Access 2002 the reports have the same OpenArgs property that the OpenForm method does ... Basically, YOU CAN PASS DATA DIRECTLY TO THE REPORT ITSELF ... You don't need to have a report be "bound" to a form for parameter/selection/setting information ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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