computer






 

Question by  lycurgus (13)

How do I access the form vba code to loop through query results?

 
+7

Answer by  gigo (1706)

Start with an ODBC Database. Go to codeproject and search for an ODBC project. You can preselect VB. Search for an example that allows you to enter pure SQL.

 
+7

Answer by  mgroves (9)

This really depends on what context you are using VBA (Visual Basic for Applications). It sounds like you are probably using Access. With Access VBA, there are a number of ways to access query results, but one common way is with DAO recordsets. To loop through, simply write a 'while not yourRecordset.Eof'.

 
+2

Answer by  ahsanmahmoodawan (1169)

brother its a long code and i can't write it here but i m starting it [code] din rst as dao.recodset dim empid as long dim empemail as string set rst = currentdb.openrecord set(select *from qry _employee adress with rst if not .eof .bof then do until .eof even more

 
You have 50 words left!