|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
print report for current record
Let me say this up front. I'm a novice using MS Access. But here's my problem. I have a database created with Access 97 that I have code to run a report for only the current record. It works fine. But when I try to copy the code to another database created in Access 2000, it won't run. I get a run time error "2465 Microsoft Access can't find the field 'I' referred to in your expression".
Here's the code Dim strWere As String If Me.Dirty Then 'Save any changes. Me.Dirty = False End If If Me.NewRecord Then MsgBox "SELECT A RECORD TO PRINT" Else strWhere = "[ID] = " & Me.[ID] DoCmd.OpenReport "rptPrintRecord", acViewPreview, strWhere End If Do I need to change something in the expression or is it because code for 97 is different then 2000. |
|
#2
|
||||
|
||||
|
Look at the first line of your code!!
you have Dim strWere As String don't you mean Dim strWhere. ?????? Regards,
__________________
Regards, John A |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > print report for current record |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|