473,503 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not sure how to code a loop structure...

4 New Member
Hi all,

I've got some code in a form (frmTimer) which checks another form (frmOrders) every 2 seconds to see if any new records have been added. If yes, then a MsgBox pops up on the admin's screen. I'd like to add some more similar code to frmTimer to check if a particular field (chkAcknowledged) in frmOrders has been checked off, and if yes, issue a popup MsgBox. However - the caveat is that in this case I need to be able to identify the specific record for which the chkAcknowledged check box has been checked off, e.g. "The order for 51 widgets, Order ID 22 has been acknowledged".

I'm considering doing it with a loop (perhaps For...Each) statement, where every 2 seconds frmTimer would loop through all the chkAcknowledged controls in frmOrders and check to see if chkAcknowledged.Value <> chkAcknowledged.OldValue.

I've tried reading up on looping online but I'm still not sure how to code this...can someone point me the right way with an example please? Thanks.
Jan 14 '09 #1
4 1594
RuralGuy
375 Recognized Expert Contributor
What mechanism will you use to keep from duplicating the pop up messages?
Jan 14 '09 #2
damjanovic
4 New Member
The user who sees the popup message will click "OK" and it goes away. I'm not sure if that answers your question properly? A message should pop up when the chkAcknowledged control's value changes to True/-1. The code should be able to identify the record where the Acknowledged checkbox value changed.
Jan 15 '09 #3
RuralGuy
375 Recognized Expert Contributor
It sounds to me as though your PopUp form will need to put up the additional PopUp. Once the record is saved, unless you have a duplicate table there is no histore of a field changing.
Jan 15 '09 #4
RuralGuy
375 Recognized Expert Contributor
I guess you could have a Notification Table and make entries from the PopUp and then delete the entries when the Supervisor reviews them. Then you could watch the Notification Table from the Timer Form.
Jan 15 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2584
by: beliavsky | last post by:
How do you keep Python code properly indented as you modify it? I use an Emacs-type editor that has a Python mode, so the initial indenting is easy. If I later want to put a 'for' loop (or an 'if'...
13
1383
by: Christopher Benson-Manica | last post by:
This is intended to be a simple version of the Unix "head" command, i.e. a utility that displays the first n lines of a file. Comments welcomed... #include <cstdlib> #include <iostream>...
2
2306
by: Guadala Harry | last post by:
I have some logic that currently processes values retrieved by looping through a HashTable/ListDictionary structure (a hash table that contains ListDictionary objects as its values). Logically it's...
2
1953
by: Steven K | last post by:
Hello, I am trying to learn how to use Code Behind. Essentially, the example of Block 1 and Block 2 are the same. The difference is that in Block 1 I explicitly set the parameter value to...
6
71931
by: John Pass | last post by:
What is the difference between a While and Do While/Loop repetition structure. If they is no difference (as it seems) why do both exist?
53
3119
by: jaso | last post by:
Can you give any comments on this code? I used one goto, is it bad? #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <assert.h> #define NOT_NULL 1
9
5645
by: Sayudh27 | last post by:
Hi all, I am a relatively new programmer in C++...I need to write a code that performs multicasting as well as returns the data-packets in a decompressed form.Data-receipt seems to work...
1
1348
by: rich | last post by:
Hi all, I have a fairly complex "feed" application that recieves messages from an external user-supplied API via a callback function, and attempts to forward these messages to another...
24
4407
by: oliv29 | last post by:
Hello, Can anyone tell me how do i fill a structure's fields in a for loop ? #define MAX_FIELD_LEN 10 typedef struct { char field1; /*will store first string read from keyboard*/
0
7258
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
7313
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
6970
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
7441
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
4663
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
3156
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...
0
1489
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 ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
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...

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.