LITTLEBLACKDOG.COM Forum Index LITTLEBLACKDOG.COM

 
LWD LWD   FAQ FAQ   Memberlist Memberlist   Usergroups Usergroups   Active Topics Active Topics   Register Register  
  Profile Profile   Log in to check your private messages Log in to check your private messages   Log in Log in  
  Who is Online Who is Online   Image Gallery Image Gallery   Chat Chat   Search Search  
  LWDGear       LBDGear  

View next topic
View previous topic
Post new topic     Reply to topic   LITTLEBLACKDOG.COM Forum Index » Code Warriors
Author Message
eXpired
Toilet Drinker
Toilet Drinker


Joined: 13 Mar 2003
Posts: 376
Location: Work

Post Posted: Mon Jul 14, 2003 11:46 pm   Post subject: VBA: dbOpenDynaset Reply with quote Back to top  

The query "E_G" contains 5 rows, but when I debug the code; rst.RecordCount always gets 1. Why is that and how do I avoid it?

Code: Select all

    Set dbs = CurrentDb
    Set rst = dbs.OpenRecordset("E_G", dbOpenDynaset)
    m = 0
    i = 1
    j = rst.RecordCount
    If j = 0 Then
        MsgBox "Error"
        Exit Sub
    End If
    IValue = 100 / j
    For i = 1 To j
        If i = 1 Then
            rst.MoveFirst
        Else
            rst.MoveNext
        End If

_________________
-- I swear to drunk I'm not God!
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic     Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours

Help us keep advertisements off this site. Donate today!