Dim rst As DAO.Recordset
Dim DB As DAO.Database
set DB=currentDb()
Dim testid as string
testid = DLookup("tstid" , "tblfinalex am", "traineeno = '200 '")
up to here its working fine.it is taking testid from table.
But i want to initialise the testid to tstid in opening record set.
Set rst = DB.OpenRecordse t("select subcode from tblt20 where tstid = 'testid'", dbOpenDynaset)
here it is not taking tstid from the table.how to assign tstid=testid in where condition in my code
please help me
thanks in advance.
Dim DB As DAO.Database
set DB=currentDb()
Dim testid as string
testid = DLookup("tstid" , "tblfinalex am", "traineeno = '200 '")
up to here its working fine.it is taking testid from table.
But i want to initialise the testid to tstid in opening record set.
Set rst = DB.OpenRecordse t("select subcode from tblt20 where tstid = 'testid'", dbOpenDynaset)
here it is not taking tstid from the table.how to assign tstid=testid in where condition in my code
please help me
thanks in advance.
Comment