gabriellec
Programmer
We have this form with a button to launch a report (Access 97). When the report opens we want it to filter it with only the first 5 left characters of the field. The code works great on two computers... but does not work on every other one. X-)
So take a look at my code:
________________________________________________
Private Sub deposit_Click()
On Error GoTo Err_deposit_Click
Dim stDocName As String
Dim stFilter As String
stDocName = "Deposit Description Report"
stFilter = "legal = Left([forms]![project form]![legal],5)"
DoCmd.OpenReport stDocName, acViewPreview, , stFilter
Exit_deposit_Click:
Exit Sub
Err_deposit_Click:
Resume Exit_deposit_Click
End Sub
________________________________________________
I have narrowed down the problem to this line of code that is bugged:
stFilter = "legal = Left([forms]![project form]![legal],5)"
any ideas for me?
-Gabrielle
So take a look at my code:
________________________________________________
Private Sub deposit_Click()
On Error GoTo Err_deposit_Click
Dim stDocName As String
Dim stFilter As String
stDocName = "Deposit Description Report"
stFilter = "legal = Left([forms]![project form]![legal],5)"
DoCmd.OpenReport stDocName, acViewPreview, , stFilter
Exit_deposit_Click:
Exit Sub
Err_deposit_Click:
Resume Exit_deposit_Click
End Sub
________________________________________________
I have narrowed down the problem to this line of code that is bugged:
stFilter = "legal = Left([forms]![project form]![legal],5)"
any ideas for me?
-Gabrielle