Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / April 2006

Tip: Looking for answers? Try searching our database.

dao help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
congngo@yahoo.com - 05 Apr 2006 22:11 GMT
Hi all

            My code is working fine.  I just need help with looping
the rst.move

  Dim rst As Recordset
  Dim varCXL1, varCXL2, varclx3, varCXL4, varCXL5  As Integer

          Set rst = CurrentDb.OpenRecordset("qry_cxlcount")
           rst.MoveFirst
               varCXL1 = rst!countcxl
           rst.MoveNext
               varCXL2 = rst!countcxl
           rst.MoveNext
               varCXL3 = rst!countcxl
           rst.MoveNext
               varCXL4 = rst!countcxl
           rst.MoveLast
               varCXL5 = rst!countcxl
   set rst = Nothing

Can I loop "move" to make it look better
salad - 05 Apr 2006 22:26 GMT
> Hi all
>
[quoted text clipped - 18 lines]
>
> Can I loop "move" to make it look better

    Dim ar(5)
    Set rst = CurrentDb.OpenRecordset("qry_cxlcount")
    rst.MoveFirst
    For i = 1 to 5
    ar(i) = rst!Countcx1
    rst.MoveNet
    Next
    set rst = Nothing
congngo@yahoo.com - 06 Apr 2006 05:02 GMT
does not work

error message "object required"
congngo@yahoo.com - 06 Apr 2006 05:05 GMT
nevermind I misstyped the word "rst!countcxl1"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.