Affichage des articles dont le libellé est how to get vba querry output in to variable. Afficher tous les articles
Affichage des articles dont le libellé est how to get vba querry output in to variable. Afficher tous les articles

how to get vba querry output in to variable

dimanche 15 mars 2015

Hi,



I'm new to vba and I want to get the output of a vba query (only one solution possible) in to a variable but the variable stays empty.

Can somebody tell me what i'm doing wrong ?





Dim rst As DAO.Recordset

Set rst = CurrentDb.OpenRecordset("SELECT info FROM evaluationtable WHERE evaluation= " & evaluationchoice & " ")

var = rst(0).Value

rst.Close



some explination: evaluation and info are fields of evaluationtable

evaluationchoice is a field in an accessform where I can choice a value from the evaluation field



the table is build as this (only two fields) evaluation - info

how to get vba querry output in to variable

Labels