J
Jason Frazer
I have a report that works great if i report 1 record at a time. If I
report more than 1 record at a time my fields that i used the dlookup
command do not change. They keep the value from the record currently
selected on my form. All the
other fields work great. How can i fix this problem? All the printing is
handles though event procedures on buttons.
Here is my control source expression in the report.
=DLookUp("[Field2]","[31 Design Load]","[Field1] = Forms![Bridge Inspection
Form]![Design Load (31)]")
Here is the code for printing the currect record the the loaded form [Bridge
Inspection Form]
Private Sub Command243_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
stDocName = "Structure Inventory and Appraisal Sheet"
DoCmd.OpenReport "Structure Inventory and Appraisal Sheet", acPreview, ,
"[Structure Number (8)] = Forms![Bridge Inspection Form].form![Structure
Number (8)]"
End Sub
Here is the code for printing all the records in form [Bridge Inspection
Form]
Private Sub Command244_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
stDocName = "Structure Inventory and Appraisal Sheet"
DoCmd.OpenReport "Structure Inventory and Appraisal Sheet", acPreview
End Sub
Thanks for any help you can provide
Jason
report more than 1 record at a time my fields that i used the dlookup
command do not change. They keep the value from the record currently
selected on my form. All the
other fields work great. How can i fix this problem? All the printing is
handles though event procedures on buttons.
Here is my control source expression in the report.
=DLookUp("[Field2]","[31 Design Load]","[Field1] = Forms![Bridge Inspection
Form]![Design Load (31)]")
Here is the code for printing the currect record the the loaded form [Bridge
Inspection Form]
Private Sub Command243_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
stDocName = "Structure Inventory and Appraisal Sheet"
DoCmd.OpenReport "Structure Inventory and Appraisal Sheet", acPreview, ,
"[Structure Number (8)] = Forms![Bridge Inspection Form].form![Structure
Number (8)]"
End Sub
Here is the code for printing all the records in form [Bridge Inspection
Form]
Private Sub Command244_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim stDocName As String
stDocName = "Structure Inventory and Appraisal Sheet"
DoCmd.OpenReport "Structure Inventory and Appraisal Sheet", acPreview
End Sub
Thanks for any help you can provide
Jason