Per aprirlo ho utilizzato la creazione guidata quando ho creato il bottone...
Ecco il codice:
codice:
Private Sub Comando61_Click()
On Error GoTo Err_Comando61_Click
Dim stDocName As String
stDocName = "ReportProposteUsato"
DoCmd.OpenReport stDocName, acPreview
Exit_Comando61_Click:
Exit Sub
Err_Comando61_Click:
MsgBox Err.Description
Resume Exit_Comando61_Click
End Sub
E dopo ho messo come hai detto tu:
codice:
Private Sub Report_Open(Cancel As Integer)
Dim lngScelta As Long
lngScelta = CLng(InputBox("Inserire...", "Inserimento"))
Me.RecordSource = "select * from tbentrate " & _
"where identrata = " & lngScelta
End Sub
Grazie tanto