Flickering Fields

D

DS

I think this loop is always running because I fields flickering.
I want it to run through all of the records only once, do what its
suppose to do and then stop. Something tells me that this isn't doing it.
Any help appreciated.
Thanks
DS


With Forms!Sales.SalesDetails.Form.Recordset
If Forms![Sales].[SalesDetails].Form!Text115 > 0 Then
.MoveFirst
Do While .EOF = False And .BOF = False
.Edit
!SDInclusive = False
!SDTaxed = True
If Forms!Sales.SalesDetails.Form!NoTax = True Then
!SDTaxed = False
!SDInclusive = False
End If
.Update
.MoveNext
Loop
End If
End With
 
R

RoyVidar

DS wrote in message said:
I think this loop is always running because I fields flickering.
I want it to run through all of the records only once, do what its suppose to
do and then stop. Something tells me that this isn't doing it.
Any help appreciated.
Thanks
DS


With Forms!Sales.SalesDetails.Form.Recordset
If Forms![Sales].[SalesDetails].Form!Text115 > 0 Then
.MoveFirst
Do While .EOF = False And .BOF = False
.Edit
!SDInclusive = False
!SDTaxed = True
If Forms!Sales.SalesDetails.Form!NoTax = True Then
!SDTaxed = False
!SDInclusive = False
End If
.Update
.MoveNext
Loop
End If
End With

Hi

Depending on version, I think 2000+, you could try using the
recordsetclone in stead of recordset, and I prefer using a variable,
but, that's preference:

dim rs as dao.recordset
set rs = Forms!Sales.SalesDetails.Form.Recordsetclone
with rs
' rest of the code

But if you fear it's always running, then perhaps you've placed it
in the wrong event?

There are circumstances where you will see some flickering, for
instance sometimes when using conditional formatting and
calculated controls, see for instance
http://allenbrowne.com/bug-05.html
or tab controls
http://allenbrowne.com/ser-46.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ECHO in the right place? 0
Nested IF 7
Making a macro only work on certain files 2
VBA Export to PDF 0
DLookUp Trouble 3
It Says NO CURRENT RECORD 2
Code Help 10
VBA for Dependents shortcut menu 0

Top