473,626 Members | 3,276 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 1612
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.RecordsetClo ne.MoveLast
Debug.Print Me.RecordsetClo ne.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*****@verizo n.net> wrote in message
news:N3******** ******@news.usw est.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
8690
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 platform indeed, the code is converted to a byte code and this byte code can be run on any machine which has
7
9984
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 using CodeDOM for my scripting needs (I realize I could use yacc or something else, but I wanted to try using CodeDOM -- this is more of an exercise for me to learn this stuff). Well, I compile my in-game scripts just fine. See appendix A for my code
1
1400
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 information which is presented. I hear it is very useful, so I would like to undertand how to use it. What is the difference between the @Page directive of Trace="True" and the <trace> element in the web.Configure file? I have used this option...
10
3462
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 answer why ? The impact of this is that values added via javascript will never make it back to the server side code unless one does some jiggery pokery with hidden fields etc. If this is true, then I would like to understand the reason behind the...
2
1751
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. I want to use maximum out of the available trace details . or let me put it like this.... tell me the actual scenario's where these trace details will be use ful and
2
7374
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 a hand a point me into the right direction if there is someone who has had experiance with this. By all means if you know a better place to ask, let me know. There is an excel help file titled YIELD. I will copy any paste the file below. I am...
10
2429
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 that would trace or log the order of line execution for a multi-module Python program. I am having a little bit of a problem tracking down a problem that I mentioned earlier (http://groups.google.com/group/comp.lang.python/msg/9c759fc888b365be),...
7
1365
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 Debug.WriteLine("*******max0.05************") For i = 0.01 To 0.06 Step 0.01
1
2602
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 program. using step by step procedure i.e "F10" after pressing F5 (Debug Mode) from Break Point I get disassembly code instead of showing the steps in the program... I dont know know why this happenes and need to get rid of this problem so that I...
0
8269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8711
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5576
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4094
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2630
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 we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.