Results 1 to 4 of 4

Thread: Report Fields

  1. #1
    Join Date
    Mar 2004

    Unanswered: Report Fields

    Cna anyone help me -

    I have a report that prints labels dependent on tick boxes, so for example;

    if record has tick1, tick3, tick 4 it will print the report with labels for these boxes (labels as in what the item is for!)

    This is great for creating reports based on tick boxes but i have one major flaw...

    if the record has say tick1 and tick5 it leaves spaces between the labels on the report - is there a way to close these gaps and print the labels one after another, so if i had tick4, tick6 they would print one line below each other without any gaps (etc etc)


  2. #2
    Join Date
    Aug 2002
    Northampton, England
    The Microsoft Knowledge Base may provide the answer.

  3. #3
    Join Date
    Mar 2004
    Actually that doesn't really help as my labels are linked to yes/no boxes,
    so i have cbo1 is field (yes/no) and have check that if cbo1=true then cbo1label is visible (else its invisible).

    so i need to do the same but for the labels and not the fields? is this possible?
    (and cbo1 is hidden)

    Basically I have 5 labels each that are shown or hidden dependent on the cbo1 to cbo5 ick boxes
    that part works fine, but if its easier i would like to have another control or text which links the cbo1label + cbo2label
    so each are displayed below each other... that way if cbo2 is hidden then nothing is shown, etc...
    get my drift?
    Last edited by NeilMansell; 08-21-06 at 06:11.

  4. #4
    Join Date
    Feb 2004
    One Flump in One Place
    Hi Neil

    there is a hard way and an easy way to do this.

    replace your labels with an unbound text box. Have your code check the value of the options and build up the control source of the textbox.

    e.g. (air code):

    Me.MyTestBox.RecordSource = " = """""
    If optOne = True Then
    Me.MyTestBox.RecordSource = Me.MyTestBox.RecordSource & " & ""My OptOne Text"" & vbCrLf
    End If
    If optTwo = True Then
    Me.MyTestBox.RecordSource = Me.MyTestBox.RecordSource & " & ""My OptTwo Text"" & vbCrLf
    End If
    and so on, using the can grow\ shrink info referred to above.

    A harder way is to have an integer that defines the top value for the first label. As each label is made visible, asign it's top property to this and increment the variable by the height of the label.

    pootle flump
    ur codings are working excelent.

Posting Permissions

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