T
Tony Girgenti
Hello,
When i use the attached code my report always prints all records. I can't
figure out how to make it select only the records in the where option. When
i watch "strWhere" it shows "[COMPANY NAME] = BLAIR".
Any help would be appreciated.
Tony
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "[COMPANY NAME] = " & Forms![Form1]![Combo0]
stDocName = "CHF STATUS 2"
DoCmd.OpenReport stDocName, acPreview, strWhere
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
When i use the attached code my report always prints all records. I can't
figure out how to make it select only the records in the where option. When
i watch "strWhere" it shows "[COMPANY NAME] = BLAIR".
Any help would be appreciated.
Tony
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "[COMPANY NAME] = " & Forms![Form1]![Combo0]
stDocName = "CHF STATUS 2"
DoCmd.OpenReport stDocName, acPreview, strWhere
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click