vba - Access 2013 Fill table with a Recordset -


i want execute select sql-command , fill table information table.

this current progress:

set rs = currentdb.openrecordset("select * myorder") 

i got information in recordset don't know how put table. please no bad comments, because dont have many experience vba + access hope guys can me.

my table

|        myorder                            | |-------------------------------------------| | aid | aasset |  aordernumber | asn        | |  1  |  1235  |    12234156   | asff45432s | |  2  |  1236  |    12541221   | wsabbs211z | 

this table , want execute sql above put result of recordset tableview.

set rs = currentdb.openrecordset("select * myorder")  'the code between rs.addnew, , rs.update add records fields  rs.addnew      rs!aid = 3      rs!aasset = 1237      rs!aordernumber = 11111111      rs!asn = aaaaaaaaaaa rs.update 

if editing existing information correct syntax is:

rs.edit     rs!field1 = "test string" rs.update 

bare in mind start @ first record in recordset. can loop through using

rs.movenext rs.movefirst rs.movelast 

or loop right way end of recordset can use:

do until rs.eof 'do     rs.movenext loop 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -