Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text Formating (2000)

    I am working on an event calendar. One of the requirements is that events that span several days be easily seen as a multiday event. My solution was to add a Mark field with ## as the value. That works out OK but is not visible enough. What I would like to do is have the event bold if the Mark field is not null. Here is how the unbound box on the report gets it 's information.
    If [Forms]![frmcalander]![Command0].Visible = True Then
    With rstRecords
    .FindFirst "[Day] =" & Crit0D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Do While Not .NoMatch
    strText0 = IIf(IsNull(![Event]), strText0 & " " & ![Mark] & ![Name] & Chr(13) + Chr(10), strText0 & " (" & ![Event] & ") " & ![Mark] & ![Name] & Chr(13) + Chr(10))
    .FindNext "[Day] =" & Crit0D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Loop
    End With
    Else
    End If
    If [Forms]![frmcalander]![Command1].Visible = True Then
    With rstRecords
    .FindFirst "[Day] =" & Crit1D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Do While Not .NoMatch
    strText1 = IIf(IsNull(![Event]), strText1 & " " & ![Mark] & ![Name] & Chr(13) + Chr(10), strText1 & " (" & ![Event] & ") " & ![Mark] & ![Name] & Chr(13) + Chr(10))
    .FindNext "[Day] =" & Crit1D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Loop
    End With
    Else
    End If
    If [Forms]![frmcalander]![Command2].Visible = True Then
    With rstRecords
    .FindFirst "[Day] =" & Crit2D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Do While Not .NoMatch
    strText2 = IIf(IsNull(![Event]), strText2 & " " & ![Mark] & ![Name] & Chr(13) + Chr(10), strText2 & " (" & ![Event] & ") " & ![Mark] & ![Name] & Chr(13) + Chr(10))
    .FindNext "[Day] =" & Crit2D & "And [Month] =" & "'" & CritM & "'" & "And [Year]=" & CritY
    Loop
    End With
    Else
    End If
    ETC...................for the rest of the report

    The report looks like a calendar when viewed.
    If anyone can tell me how to bold just the lines that are multievent (Mark is not null)or color code them or just add a colored bullet to them or any ideas along those lines I would be eternally grateful.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Text Formating (2000)

    I'm having trouble figuring out how stepping through a recordset is going to populate a report. Are you saving the records at some point? Doing this sort of thing is pretty difficult with Access reports (or most other apps as well). One thing you might consider using is one of the ActiveX Calendar controls that gives you more flexibility, both in data entry and reporting. The other possibility is to do this using Automation to create a Word document from Access. With Word you can do lots more in terms of formatting, including such things as text boxes and just about anything else you can do with Word.
    Wendell

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text Formating (2000)

    Like Wendell, I don't understand your code, but you seem to be creating multi-line text strings. Access has no built-in way to format specific parts of text in a text box.

Posting Permissions

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