473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does tracing (debug) yield different results?

Hi. I have a form with a label (lblNavigate). The text (caption) is
supposed to state, either, "New Record" or "xxx of yyy" (where xxx =
current record number and yyy = total number of records). I set
me!lblNavigate.caption in the Form_Current( ) routine. If I don't trace
the routine, the text shows ("1 of 1"). There are, actually, 2 records
in the recordset. If I trace the routine (debug mode) the text gets
populated properly and it displays "1 of 2".

Why is this happening? How can I get the text to display the way I want
it to?

Thanks.
SueB

Regards,
SueB

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
1 1603
This is a timing issue.

In the first moment that the form loads, it loads just the first record. The
others are loaded when it gets a spare moment. When you trace through the
code, there has been a spare moment, and so the count is different.

If you are using code to get the number of records, you could force all
records to load like this:
Me.RecordsetClone.MoveLast
Debug.Print Me.RecordsetClone.RecordCount & " record(s)"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Susan Bricker" <sl*****@verizon.net> wrote in message
news:N3**************@news.uswest.net...
Hi. I have a form with a label (lblNavigate). The text (caption) is
supposed to state, either, "New Record" or "xxx of yyy" (where xxx =
current record number and yyy = total number of records). I set
me!lblNavigate.caption in the Form_Current( ) routine. If I don't trace
the routine, the text shows ("1 of 1"). There are, actually, 2 records
in the recordset. If I trace the routine (debug mode) the text gets
populated properly and it displays "1 of 2".

Why is this happening? How can I get the text to display the way I want
it to?

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
8639
by: Minti | last post by:
Hi there everybody, I was just wondering that too many people choose to use language like Java because of its architecture independence, this AI is achieved because Java is as such a...
7
9967
by: Clint Herron | last post by:
Howdy! I posted this question on CSharpCorner.com, but then realized I should probably post it on a more active newsgroup. This will be my only cross-post. I'm creating a game engine, and...
1
1389
by: Jim Heavey | last post by:
I am trying to understand the use of Tracing/ In the @page you can add Trace="true" which provides a page of tracing information. Where can I find some material to help me make sense of the...
10
3445
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
2
1746
by: deepukutty | last post by:
Hi all, I know tht we can do tracing in two ways.one in application level and the other is at Page level. I am able to see the details of trace either on the page itself or .../trace.axd page....
2
7366
by: IntraRELY | last post by:
I know this isnt really a VB question per say, but is what I am developing in VB.NET and Excel is the only place that has provided direction. I wanted to ask the public if perhaps you could lend me...
10
2422
by: Michael B. Trausch | last post by:
Alright, I seem to be at a loss for what I am looking for, and I am not even really all that sure if it is possible or not. I found the 'pdb' debugger, but I was wondering if there was something...
7
1356
by: UnkleVo | last post by:
Can someone run the code below and tell me why it never reaches 0.06? I am really puzzled..... or just going crazy? Dim i As Double For i = 0.01 To 0.05 Step 0.01 Debug.WriteLine(i) Next...
1
2593
Digital Don
by: Digital Don | last post by:
Hi, I have been using Visual Studio 2005 for 5 months now and quite a few time I have come across a problem which is, when I write a program and try to debug and trace the error/problem in the...
0
7178
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.