air1access
Technical User
I am tryin' to format text in a textbox on a report...
I need the words "GTWY" and "Schd Date" in bold font. The string can start with either "GTWY" or "Schd Date" or be in the middle of the string following right after a comma (","). How can I format the string to show only these words in bold font...??
Below is an example of what I'm working with...
Any suggestions or examples...??
Thanks in advance..!!
air1access
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strGTWY As String
Dim strSchdDate As String
Dim intLeft As Integer
Dim intTop As Integer
If Not IsNull(Me.txtWanChanges) Then
strGTWY = Left(Me.txtWanChanges, InStr(Me.txtWanChanges, " ") - 1)
'Instr(StringToCheck,StringToMatch,StartPosition)
strSchdDate = Mid(Me.txtWanChanges, InStr(Me.txtWanChanges, " ") + 1)
Me.CurrentX = Me.txtWanChanges.Left
Me.CurrentY = Me.txtWanChanges.Top
Me.ForeColor = vbBlue
Me.fontsize = 8
Me.FontBold = True
Me.FontName = "Arial"
Me.Print strGTWY & " "
Me.FontBold = False
Me.FontName = "Arial"
Me.CurrentY = Me.txtWanChanges.Top
Me.Print strSchdDate
End If
End Sub
I need the words "GTWY" and "Schd Date" in bold font. The string can start with either "GTWY" or "Schd Date" or be in the middle of the string following right after a comma (","). How can I format the string to show only these words in bold font...??
Below is an example of what I'm working with...
Any suggestions or examples...??
Thanks in advance..!!
air1access
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strGTWY As String
Dim strSchdDate As String
Dim intLeft As Integer
Dim intTop As Integer
If Not IsNull(Me.txtWanChanges) Then
strGTWY = Left(Me.txtWanChanges, InStr(Me.txtWanChanges, " ") - 1)
'Instr(StringToCheck,StringToMatch,StartPosition)
strSchdDate = Mid(Me.txtWanChanges, InStr(Me.txtWanChanges, " ") + 1)
Me.CurrentX = Me.txtWanChanges.Left
Me.CurrentY = Me.txtWanChanges.Top
Me.ForeColor = vbBlue
Me.fontsize = 8
Me.FontBold = True
Me.FontName = "Arial"
Me.Print strGTWY & " "
Me.FontBold = False
Me.FontName = "Arial"
Me.CurrentY = Me.txtWanChanges.Top
Me.Print strSchdDate
End If
End Sub