In php, we could get the result from the query by executing it and then use mysql_fetch_array($queryresult). How can we use something of this nature in access? Thanks!
I am a vast well of ignorance about php (among other things) but in Access you would use a recordset.
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.Openrecordset("Select * From SomeTable")
Do Until rs.EOF
SomeValue = rs![SomefieldName]
' ... etc. ...
rs.MoveNext
Loop
[blue]Golom[/blue] has the exact answer you require. [blue]Recordsets[/blue] are the replacement for what you ask and is a well deversified subject. Look it up in VBA help!
BTW: Welcome to [blue]Tek-Tips![/blue] Do have a look at one of the links at the bottom of my post. The links will help you [blue]ask better questions[/blue], get [blue]quick responses[/blue], [blue]better answers[/blue], and insite into [blue]etiquette[/blue] here in the forums. Again . . . Welcome to [blue]Tek-Tips![/blue] . . . [blue]Its Worthy Reading![/blue]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.