Salve,
devo creare un Report in Access.
Utilizzando VBA, all'apertura del Report devo assegnare a una casella di testo (il cui nome è "Testo") il valore di una variabile. Ecco il codice:
Private Sub Report_Open(Cancel As Integer)
Dim strOutput As String
strOutput = "testo di esempio"
Testo = strOutput
End Sub
Però mi da il seguente errore sull'istruzione "Testo = strOutput": "Impossibile assegnare un valore all'oggetto".
Ho provato anche:
Me.Testo = strOutput
e
Report.Section("Corpo").Controls("Testo") = strOutput
ma da sempre lo stesso errore.
Come posso fare??
devo creare un Report in Access.
Utilizzando VBA, all'apertura del Report devo assegnare a una casella di testo (il cui nome è "Testo") il valore di una variabile. Ecco il codice:
Private Sub Report_Open(Cancel As Integer)
Dim strOutput As String
strOutput = "testo di esempio"
Testo = strOutput
End Sub
Però mi da il seguente errore sull'istruzione "Testo = strOutput": "Impossibile assegnare un valore all'oggetto".
Ho provato anche:
Me.Testo = strOutput
e
Report.Section("Corpo").Controls("Testo") = strOutput
ma da sempre lo stesso errore.
Come posso fare??