Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
' Create desired Font settings
' for the Last Name - Bold Text
.FontBold = True
'.FontItalic = True
'.ForeColor = RGB(255, 0, 0) 'RED
With Me
' Make sure we are in Twips
.ScaleMode = TWIPS
' Grab Controls current Font settings
.FontName = CtlDetail.FontName
.fontsize = CtlDetail.fontsize
' Create desired Font settings
' for the Last Name - Bold Text
'.FontBold = True
'.FontItalic = True
[COLOR=red].ForeColor = RGB(255, 0, 0) 'RED[/color]
.CurrentX = CtlDetail.Left
.CurrentY = CtlDetail.Top
' For some reason must be Me.Print not .Print
Me.Print strLast;
Me.Print ", ";
' Reset Font-> NO Bold for FirstName
[COLOR=red].ForeColor = vbBlack[/color]
'.FontBold = False
'.FontItalic = False
Me.Print strFirst
="Name: " & [First_Name] & " " & [Last_Name]
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Const TWIPS = 1
Dim strLabel As String
Dim strFirst As String
Dim strLast As String
Dim intPosition As Integer
Dim CtlDetail As Control
Dim intMargin As Integer
' I'll leave in Italic and Color
' in case you want to use these
Dim oldFontBold As Integer
Dim oldFontItalic As Integer
Dim oldFontUnderline As Integer
Dim oldForeColor As Long
Dim oldFontName As String
Dim oldfontsize As Integer
Dim oldScaleMode As Integer
'Save current Font settings
With Me
oldFontItalic = .FontItalic
oldFontBold = .FontBold
oldForeColor = .ForeColor
oldFontUnderline = .FontUnderline
oldFontName = .FontName
oldfontsize = .fontsize
oldScaleMode = .ScaleMode
End With
' Set Margin for Border we will draw
' around your concatenated control.
intMargin = 60
For Each CtlDetail In Me.Section(acDetail).Controls
If CtlDetail.name = "[red][i]yourcontrolname[/i][/red]" Then
With CtlDetail
.Visible = False
intPosition = InStr(InStr(1, .Value, ":") + 2, .Value, " ")
strLabel = Left(.Value, InStr(1, .Value, ":"))
strFirst = Mid$(.Value, InStr(1, .Value, ":") + 2, Len(.Value) - intPosition)
strLast = Mid(.Value, intPosition + 1)
End With
With Me
' Make sure we are in Twips
.ScaleMode = TWIPS
' Grab Controls current Font settings
.FontName = CtlDetail.FontName
.fontsize = CtlDetail.fontsize
.CurrentX = CtlDetail.Left
.CurrentY = CtlDetail.Top
'create desired Font settings
'for the label Name:
.ForeColor = RGB(255, 0, 0) 'RED
.CurrentX = CtlDetail.Left
.CurrentY = CtlDetail.Top
Me.Print strLabel;
' Create desired Font settings
' for the First Name
.ForeColor = RGB(0, 0, 0) 'Black
Me.Print strFirst;
Me.Print " ";
Me.Print strLast
' Restore Reports original Font settings
.ScaleMode = oldScaleMode
.FontBold = oldFontBold
.FontItalic = oldFontItalic
.FontUnderline = oldFontUnderline
.FontName = oldFontName
.fontsize = oldfontsize
.ForeColor = oldForeColor
End With
With CtlDetail
'While we are here lets draw a box around each field
Me.Line ((.Left - intMargin), (.Top - intMargin))-Step((.Width + (intMargin * 2)), (.Height + (intMargin * 2))), 0, B
End With
End If
Next
' Cleanup
Set CtlDetail = Nothing
End Sub