Hi everyone,
I am new in Access usage; I tried to use a parametric SQL query in VBA code and I want to use a field of the obtained result of the query:
Do Until tKMWorksheet.EOF
Set qCommessaDipendente = DBCOrrente.QueryDefs("CommessaDipendenteID")
temp = tKMWorksheet.Fields("IDCommessaTrasferta")
qCommessaDipendente.Parameters![NumeroCommessa:] = temp
Set recsCommDipID = qCommessaDipendente.OpenRecordset
strCommDipID = recsCommDipID.Fields("CommessaDipendenteID")
...
Where am I wrong? The error says that there is not a current record...
Many Thanks....