Ciao,
In access ho una maschera per la ricerca dati che viene fatta su determinati campi.(N.commessa, agente..etc).man mano che digito mi compaiono i record che rispondono al criterio, e sin qui nessun problema.
nel momento in cui ho la ricerca non trova dati, anziche entrare nella gestione dell'errore con un msg, mi compare l'errore RunTime 2185, impossibile fare riferimento ad una proprieta o metodo per un controllo a meno che non abbia lo stato attivo.
vi riporto il codice :
Private Sub Agente_Change()
Dim strMsg As String, strTitolo As String
Dim intStile As Integer
If Right(Me.Agente.Text, 1) = " " Then
Exit Sub
Else
Me.Requery
Me.Recalc
Me.Agente.SetFocus
Me.Agente.SelStart = Me.Agente.SelLength
End If
If Me.Conta = 0 Then
strMsg = "AGENTE INESISTENTE --> " & Me.Agente & "." & vbCrLf + vbCrLf & "Verificare i dati immessi"
intStile = vbOKOnly + vbExclamation
strTitolo = "ATTENZIONE"
MsgBox strMsg, intStile, strTitolo
Pulisci_Click
Me.Agente.SetFocus
End If
Agente_Exit:
Exit Sub
Agente_Err:
Resume Agente_Exit
End Sub
qualche aiuto?