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 / SQL Server / ADP / July 2005

Tip: Looking for answers? Try searching our database.

How do I prevent flickering?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 07 Jul 2005 19:14 GMT
I was having issues with my form not showing the correct number of records so
I put in a MoveLast and MoveFirst cycle before I get the recordcount and it
works fine but my form flickers as it cycles from last to first. I put in an
echo=false but it's still flickering. Is there another way around this?

Application.Echo False
Me.Recordset.MoveLast
Me.Recordset.MoveFirst
Application.Echo True
           
Me.WhichRecord = Me.Recordset.Bookmark
Me.HowManyRecords = Me.Recordset.RecordCount
Sylvain Lafontaine - 08 Jul 2005 06:41 GMT
Excerpt for the case where the number of records is above 10000, the correct
number of records should be displayed if you have chosen the right type of
recordset.

You should tell us more about this particular recordset and using
MoveLast/MoveFirst is probably not the best solution.

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC

>I was having issues with my form not showing the correct number of records
>so
[quoted text clipped - 11 lines]
> Me.WhichRecord = Me.Recordset.Bookmark
> Me.HowManyRecords = Me.Recordset.RecordCount
Philipp Stiefel - 08 Jul 2005 17:10 GMT
> I was having issues with my form not showing the correct number of records so
> I put in a MoveLast and MoveFirst cycle before I get the recordcount and it
[quoted text clipped - 5 lines]
> Me.Recordset.MoveFirst
> Application.Echo True

What about this?

 Me.Painting = False
 Me.Recordset.MoveLast
 Me.Recordset.MoveFirst
 Me.Painting = True

But nevertheless I agree with Sylvain. - There may be something wrong
with your approach in general.

Cheers
Phil
Jeff - 12 Jul 2005 18:31 GMT
My recordset is less than 10,000. For whatever reason it doesn't return then
correct RecordCount even though the new Recordset is correct. The reason I
need the correct RecordCount is that I have a custom navigation bar and I re-
populate WhichRecord and HowManyRecords when a filter( new RecordSource ) is
applied. Here's the orginial code:

            Dim Dealer As String
            Dim SQLString As String

            Dim rs As New ADODB.Recordset
            Dim Conn As ADODB.Connection
           
           Me.Requery
     
           Dealer = InputBox("Please enter the Dealer Name", "Search", "")

           SQLString = "EXEC dbo.SearchDealer " & Dealer
           
           Set Conn = CurrentProject.Connection
           Set rs = New ADODB.Recordset
           
           rs.Open SQLString, Conn, adOpenKeyset, adLockOptimistic
   
           If Not (rs.EOF And rs.BOF) Then
           
               Me.RecordSource = SQLString

               Me.WhichRecord = Me.Recordset.Bookmark
               Me.HowManyRecords = Me.Recordset.RecordCount
               
           Else
           
               MsgBox "No records match the criteria specified"
           
           End If

>> I was having issues with my form not showing the correct number of records so
>> I put in a MoveLast and MoveFirst cycle before I get the recordcount and it
[quoted text clipped - 14 lines]
>Cheers
>Phil
Sylvain Lafontaine - 12 Jul 2005 19:17 GMT
Possible answer: the fetching of records are asynchronous and is not
finished when you execute the statement « Me.HowManyRecords =
Me.Recordset.RecordCount ».  You should use a timer and/or poke the state of
the Recordset and wait until it has finished doing its job.

Instead of doing a second requery, you could also use the recordset rs as
the source of the form.  See http://support.microsoft.com/?kbid=281998 for
more informatin.
Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC

> My recordset is less than 10,000. For whatever reason it doesn't return
> then
[quoted text clipped - 55 lines]
>>Cheers
>>Phil
Andrew Backer - 14 Jul 2005 01:06 GMT
Not in front of access, so I can't be sure, but ...

Have you tried using RecordsetClone?

Me.RecordsetClone.MoveFirst/Last
Me.Recordset = Me.RecordsetClone?

I know it is what I use for searching/etc and dealing with bookmarks.
Might help.

- Andrew
 
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.