|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jun 2002
Città: NAPOLI!
Messaggi: 1310
|
[VBA + ACCESS] eseguire un comando sql
se eseguo questo codice in vba
Codice:
Private Sub CasellaCombinata3_Click() Dim strsql As String strsql = "SELECT * FROM attive where cliente ='" & CasellaCombinata3.text & "';" DoCmd.RunSQL strsql End Sub Codice:
Errore di runtime 2342: Un'azione eseguiSQL richiede un argomento costituito da un'istruzione sql grazie
__________________
"catch a homo by his toe, man I don't know no more am I the only fuckin' one who's normal any more?" |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Sep 2004
Messaggi: 3967
|
nel caso tu abbia usato ADO per connetterti al db:
e per esempio tu abbia chiamato il tuo recordset "rs" e la tua connessione "cn" Codice:
Private Sub CasellaCombinata3_Click() Dim strsql As String strsql = "SELECT * FROM attive where cliente ='" & CasellaCombinata3.text & "';" Set rs = cn.Execute(strsql) End Sub
__________________
Dai wafer di silicio nasce: LoHacker... il primo biscotto Geek
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 15:47.



















