bugs >> Problem with Form.ValidateChildren (infinite validation loop?)

by amhlaW1iZXJnZXI » Wed, 16 May 2007 04:33:03 GMT

When attempting to use the form.ValidateChildren() with multiple validation
errors the code appears to get in an infinite loop among the various
validation subroutines. With only one validation error on the form the
problem does not appear to occur. Thank you for your help on this issue.

--
Jeffrey A Heimberger, MCP
Information Systems Assistant
Stark Area Regional Transit Authority (SARTA)
Ph. 330-454-6132 x 526 -- fax 330-454-5476
Voted #1 Transit in America



bugs >> RE: Problem with Form.ValidateChildren (infinite validation loop?)

by amhlaW1iZXJnZXI » Wed, 16 May 2007 04:35:01 GMT

In addition, this loop freezes the application


bugs >> Problem with Form.ValidateChildren (infinite validation loop?)

by Ken Halter » Wed, 16 May 2007 04:53:15 GMT





What language? ValidateChildren? If this is dotNet related, you'll want to
post to a dotNet group. They all contain "dotnet" in their names.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm




bugs >> Problem with Form.ValidateChildren (infinite validation loop?)

by amhlaW1iZXJnZXI » Wed, 16 May 2007 21:43:01 GMT

I have isolated and understand the problem. When an error is found during
validation I set the focus to the bad field. As an example the focus is set
to the phone number and then when a second error is found during validation I
then set the focus to that field. The problem occurs because the last
field (phone number) has a ost focusevent which is triggered and the
event is handled calling the lost focus event and even calling the validation
event for this phone number field. I eliminated more than one set focus
command during the validation task.
--
Jeffrey A Heimberger, MCP
Information Systems Assistant
Stark Area Regional Transit Authority (SARTA)
Ph. 330-454-6132 x 526 -- fax 330-454-5476
Voted #1 Transit in America



Similar Threads

1. API VBA: Infinite Loop

Why doesn't escape end an infinite loop in SolidWorks VBA Editor.  It works
in the one for excel.  Is there something else I could do.

Corey Scheich


2. Infinite loop querying remote WMI

3. Infinite loop with crystal control viewer

Hi:
Here in my company we have been trying to figure out (for several days
already) what is the weird reason that is doing the crystal control
viewer (crviewer.dll) act this way.

When we are previewing a report (that is using an Access Database as it
source), we call this snippet of code...

    With CRViewer1
        .EnableDrilldown = False
        .EnableGroupTree = False
        .Top = 0
        .Left = 0
        .Height = ScaleHeight
        .Width = ScaleWidth
        .Zoom (100)
        .DisplayBackgroundEdge = True
        .DisplayTabs = False
        .ReportSource = m_crReport
        .ViewReport 'Here, the VB.EXE Process jumps to 100% usage
    End With

Just after we call CRViewer1.ViewReport method, the application hangs
and VB6.EXE jumps in the CPU Usage (verified through Task Manager).

There is no way to close the app (or Stop VB6), the only way to start
again is kill the process and start again... It's getting us crazy!

Here is some information about our environment
- Running on W2K
- Applied latest set of MDAC and OLEDB JET libraries (just in case it
was an Access problem) - Jet 4.0 Service Pack 8 -
- This error happens regardless whether we are in the VB IDE or if the
app is compiled.

Please, if anyone had experienced a similar problem, I would really  be
thankful for your help.

Any idea would be appreciated.

4. Calling code in DLL that has an "infinite Loop" - Visual Basic/VB

5. Infinite While Loops

Try this...

     While ucase(right(select.text, 10) <> "EVENT DATE"
             Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
     Wend

Mark



6. Weird infinite loop - Visual Basic/VB

7. XP Setup in an infinite loop

I tried to repair XP by upgrading it.  Hoping to install a good copy over a 
suspect one and not have it destroy all my installed programs and files.  At 
the 39th minute of the setup procedure I received a Fatal Error warning.  The 
setup stop, shows me the setup error log, then it closes out and reboots the 
computer.  The computer starts at the exact same place and repeats the 
process.  It is like an infinite loop.  I have pushed every F-key and I have 
shut off the computer and turned it back on to no avail.  It startsd the 
process over.  How can I stop this?  I would rather run a buggy version of XP 
than to be in this infinite-loop Hell.

8. GetWindow - Infinite Loop?