Sub Position()
'******** Code in this section
pertains to updating position display **********
frmShowReport.txtPosition.Text = "Record " & deNwind.rsCustomers.AbsolutePosition & _
" of " & deNwind.rsCustomers.RecordCount
End Sub
Private Sub cmdPrevious_Click()
'******** Code in this section
pertains moving to previous record **********
deNwind.rsCustomers.MovePrevious
If deNwind.rsCustomers.BOF Then
deNwind.rsCustomers.MoveNext
End If
Position
End Sub
Private Sub cmdNext_Click()
'******** Code in this section
pertains moving to next record **********
deNwind.rsCustomers.MoveNext
If deNwind.rsCustomers.EOF Then
deNwind.rsCustomers.MovePrevious
End If
Position
End Sub
Private Sub cmdLast_Click()
'******** Code in this section
pertains moving to last record **********
deNwind.rsCustomers.MoveLast
Position
End Sub
Private Sub cmdFirst_Click()
'******** Code in this section
pertains moving to first record **********
deNwind.rsCustomers.MoveFirst
Position
End Sub
Private Sub cmdExit_Click()
'******** Code in this section
pertains to closing the application **********
Unload Me
End Sub
Private Sub cmdReport_Click()
'
Make sure we have the latest info
deNwind.rsCustomers.Requery
'
Assign values to the labels in the report based on the
current record
' displayed on the form
With rptNwind
.Sections("ReportHeader").Controls("lblContact").Caption
= frmShowReport.txtContactName.Text
.Sections("ReportHeader").Controls("lblCompany").Caption
= frmShowReport.txtCompanyName.Text
.Sections("ReportHeader").Controls("lblAddress").Caption
= frmShowReport.txtAddress.Text
.Sections("ReportHeader").Controls("lblCity").Caption =
frmShowReport.txtCity.Text
.Sections("ReportHeader").Controls("lblRegion").Caption
= frmShowReport.txtRegion.Text
.Sections("ReportHeader").Controls("lblZip").Caption =
frmShowReport.txtPostalCode.Text
.Sections("ReportHeader").Controls("lblCountry").Caption
= frmShowReport.txtCountry.Text
'set the picture box to the picture property of the ActiveX
Set .Sections("ReportHeader").Controls("ImgBc").Picture
= frmShowReport.TALBarCd1.Picture
'.Orientation = rptOrientPortrait 'rptOrientLandscape
'.PrintReport True
.Show 'show the report
End With
End Sub
Private Sub Form_Load()
Position
End Sub
|