473,485 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Do While Loop Assistance

I have a Public Function which requires 2 parameters.
Public Function X (ByVal FirstParam as String, ByVal SecondParam as String)
This function displays various options for the 2 parameters(delete, open,
etc..) along with the options "Exit" and "View More".

Here's where I'm stuck...
Prior to calling the function, I fill a dataset with an undetermined amount
of records. I need to then pass the first 2 records of the dataset into the
Function. If the user selects "View More" from within the Function, the next
2 records from the dataset are passed into the function. If the user selects
"Exit" from within the Function., the process stops. What is the best way to
accomplish this? I'll obviously need to use some type of Do...While
statement to loop through the dataset records, but I can't seem to think past
this point. What is the best way to accomplish this? Thanks.
Nov 22 '05 #1
3 1253
Hi MrMike,

Why use a loop? Store the current row number and update the display based
on that.

Then again, I may have misunderstood your function as it appears to be
very odd.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 22 '05 #2
One possible way would be to use a funtion that returns a boolean. If
the return is True, then you pass the next 2 records into the function.
If False, then you exit the loop.

Hope this helps a little.

Nov 22 '05 #3
Mike,

It completly depends from what you want to do with those rows.

To say it in otherwords how are you showing those rows.

Cor
Nov 22 '05 #4

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

Similar topics

1
2945
by: Christopher Brandsdal | last post by:
Hi! I have a menu-system in JavaScript. The menu is displayed by two js functions ( DrawMenuBar and DrawSubMenu ). the first function displays the parent items, and includes the other...
5
1282
by: D | last post by:
Dear all, got a problem stuck here... Given: Title No_of_Download A 6 B 8 C 9 D 10 E 0
3
287
by: MrMike | last post by:
I have a Public Function which requires 2 parameters. Public Function X (ByVal FirstParam as String, ByVal SecondParam as String) This function displays various options for the 2 parameters(delete,...
5
25065
by: !TG | last post by:
I currently use Do while loop, but I'd rather use a For Loop though I have never gotten the hang of them. Would some one please be so kind as to show me how to loop through a recordset.
2
1437
by: Smythe32 | last post by:
Any assistance would be appreciated. I have to assign values to a table based on another table. Ex: table 1 has the following fields: ID(autonumber) Item Assignee (Assignee is not...
14
2645
by: dawnerd | last post by:
Hi, I am developing a CMS and came across something which has never happened to me before, and I re-wrote the specific script twice, both differently, and still had the same error. I'm not sure...
4
1358
by: noob114 | last post by:
Hi guys, I have to write a program with a loop that stops at the user's inputted sum. A sample output would be this. Enter your test value 123 Even integer Sum 2 2 4 ...
5
2208
by: =?Utf-8?B?V2lsbGlhbSBGb3N0ZXI=?= | last post by:
Good evening all, I am trying to write a process that uses a while loop to cycle multiple files from an array throught the StreamReader Process. The whole thing works using: Dim...
15
2338
by: Steve | last post by:
I am having problems getting values out of an array. The array is set as a global array and values are pushed into it as they are read from a JSON file using a "for loop". When the "for loop" is...
3
2244
by: gaurav92K | last post by:
sir i am working in a company . there are many pc. i want to use remote assistance. i configure all group policy which are related remote assistance.and i enable service through remote in system...
0
7090
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,...
0
6960
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7275
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...
1
4857
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
4551
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
3058
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
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
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
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.