473,411 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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 1252
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
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
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
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
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
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
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
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
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
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
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
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
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...

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.