473,608 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

10 limiting display

How do you limits employee display where you enter the department for all
the employee within that department be displayed and if lets say they are
100 or so and you have to limits 10 employee per page before entering
anything to display the next 10 again?

Nov 14 '05 #1
17 2211
kimimaro <li************ @yahoo.com> scribbled the following:
How do you limits employee display where you enter the department for all
the employee within that department be displayed and if lets say they are
100 or so and you have to limits 10 employee per page before entering
anything to display the next 10 again?


I tried to read that. Twice. Both times I failed to understand what
exactly you want.
Next time, try separating your sentences with punctuation marks like
these:
"," "." "!" "?" ":" ";"
For advanced users, separate paragraphs might help.

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"The trouble with the French is they don't have a word for entrepreneur."
- George Bush
Nov 14 '05 #2
In article <48************ *************** ***@localhost.t alkaboutprogram ming.com>,
kimimaro <li************ @yahoo.com> wrote:
How do you limits employee display where you enter the department for all
the employee within that department be displayed and if lets say they are
100 or so and you have to limits 10 employee per page before entering
anything to display the next 10 again?


Try it this way:

Department employee 100 be per or displayed page so and before and if
the how entering you department do anything have for you to to all
limits display limits employee the 10 lets the display next say
employee where 10 they within you again are that enter?

Nov 14 '05 #3

kimimaro wrote:
How do you limits employee display where you enter the department for all the employee within that department be displayed and if lets say they are 100 or so and you have to limits 10 employee per page before entering
anything to display the next 10 again?


As far as the loop control, something using the remainder operator (%)
is typical. As far as stopping then entering, some sort of read from
stdin in used. For portable code, that means reading a line. Any other
way (Hit Any Key To Continue) requires implementation-specific features
that are off-topic here.

Here is a small code fragment that displays numbers from 1 and stopping
after every 5 to wait for a carriage return. This input is not robust,
in reality you need to handle people putting in characters before the
return, and has other safety issues for you to work out. It is only a
demonstration.

int i;

for (i = 1; ; i++)
{
printf("%d\n", i);
if (i%5 == 0)
getchar();
}


Brian

Nov 14 '05 #4
Kenny McCormack <ga*****@yin.in teraccess.com> scribbled the following:
In article <48************ *************** ***@localhost.t alkaboutprogram ming.com>,
kimimaro <li************ @yahoo.com> wrote:
How do you limits employee display where you enter the department for all
the employee within that department be displayed and if lets say they are
100 or so and you have to limits 10 employee per page before entering
anything to display the next 10 again?
Try it this way: Department employee 100 be per or displayed page so and before and if
the how entering you department do anything have for you to to all
limits display limits employee the 10 lets the display next say
employee where 10 they within you again are that enter?


Right, if kimimaro next replies to this with "Thanks! That worked!"
then I'll be really scared...

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"That's no raisin - it's an ALIEN!"
- Tourist in MTV's Oddities
Nov 14 '05 #5
Really sorry for my last post I am too tired then and I only realised that
how broken my engrish(japanes e english) are. Ok,
i'll try to type in a proper way now. I want to prompt the user to enter
from the selection 1 to 5 for assigning to a particular department which
I've done that. Now I want to display them by searching on the matched
department where the user want to search such as if they want to view all
employees within Accounting department they enter the correspondant
number. BUT the thing is that I wanted to limits 10 entry to be viewed
before the user hit enter again to display the next 10. If the employee
exceeds 200 it would be a problem to display them all in one go. sorry and
thanks in advance

Nov 14 '05 #6
kimimaro <li************ @yahoo.com> scribbled the following:
Really sorry for my last post I am too tired then and I only realised that
how broken my engrish(japanes e english) are. Ok,
i'll try to type in a proper way now. I want to prompt the user to enter
from the selection 1 to 5 for assigning to a particular department which
I've done that. Now I want to display them by searching on the matched
department where the user want to search such as if they want to view all
employees within Accounting department they enter the correspondant
number. BUT the thing is that I wanted to limits 10 entry to be viewed
before the user hit enter again to display the next 10. If the employee
exceeds 200 it would be a problem to display them all in one go. sorry and
thanks in advance


You are most probably using some sort of loop (for, while, or something)
to display the matching results. Try adding an int variable which is
initialised to 0 and incremented by 1 every time you enter the loop.
Then when this variable is divisible by 10 you call getchar(). I'd
figure it'd go something like this:

int i=0;
while (/* there are employees left in the department */) {
i++;
/* show the next employee */
if ((i%10) == 0) {
getchar();
}
}

--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"The trouble with the French is they don't have a word for entrepreneur."
- George Bush
Nov 14 '05 #7

do {
printf("\n\n 0) %s\n 1) %s\n 2) %s\n 3) %s\n 4) %s\n \n [Enter the
Department to search for employee]: ", Department[0], Department[1],
Department[2], Department[3], Department[4]);
fflush(stdin);
scanf("%d",&sel ection);
if((selection !=0) && (selection !=1) && (selection !=2) && (selection
!=3) && (selection !=4)) {gotoxy(1, 24); printf(" >>invalid Department<<
Retry!\a");}
} while(selection < 0 || selection > 4);

clrscr();


printf("\n\n%s% s----------\n", lines, lines);
printf("ID\tFir st
Name\t\tDepartm ent\t\tPost\n%s %s----------\n", lines, lines);
while(strcmp(re cord[i].Department[storage],
Department[selection])==0) {
i++;
printf("\n\n%s\ t%s %s\t\t%s\t\t%s" , record[i].ID,
record[i].Name, record[i].Name2, record[i].Department[storage],
record[i].Post[rank]);
if ((i%10) == 0) {
getchar();
}

}
This is how my display should work but I dont think it is working because
it only prints out the 1st one who matched the same department input by
the user and then the the next one below them even if it doesnt match with
the department

Nov 14 '05 #8
for (i = 1; i<500 ; i++)
{
if(strcmp(recor d[i].Department[storage],
Department[selection])==0)
{
printf("\n\n%s\ t%s %s\t\t%s\t\t%s" , record[i].ID,
record[i].Name, record[i].Name2, record[i].Department[storage],
record[i].Post[rank]);

if (i%10 == 0)
getchar();
}
}
I have 500 employees in my records and i want to compare the department in
the records and the one entered by the user to
match the search while limiting 10 per page before hit again to display
the next 10. This one almost done it but still it displayed fully. There
might be some mistakes here

Nov 14 '05 #9
hi I seems to do ok now since i've been working on it some few hours and
now the problem is after I inserted 21 person to check if it works it
display the 1st person, then 8 person, then 10 person and then 2. It
supposed to display 10, 10 then 1. This is the code:
do {
printf("\n\n 0) %s\n 1) %s\n 2) %s\n 3) %s\n 4) %s\n \n [Enter the
Department to search for employee]: ", Department[0], Department[1],
Department[2], Department[3], Department[4]);
fflush(stdin);
scanf("%d",&sel ection);
if((selection !=0) && (selection !=1) && (selection !=2) && (selection
!=3) && (selection !=4)) {gotoxy(1, 24); printf(" >>invalid Department<<
Retry!\a");}
} while(selection < 0 || selection > 4);

clrscr();

printf("\n\n%s% s----------\n", lines, lines);
printf("ID\tFir st
Name\t\tDepartm ent\t\tPost\n%s %s----------\n", lines, lines);
for (i=0;i<500;i++)
{
if(strcmp(recor d[i].Department[storage],
Department[selection])==0)
{
printf("\n\n%s\ t%s %s\t\t%s\t\t%s" , record[i].ID,
record[i].Name, record[i].Name2, record[i].Department[storage],
record[i].Post[rank]);
}
if(i%10==0)
{
getchar();
getch();
clrscr();
}

}

Thanks for helping me out

Nov 14 '05 #10

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

Similar topics

6
2217
by: Kingdom | last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the results. Choose a component type from the first drop down, lets say 'car' and the second box will list all the car 'manufacturers' and the display will then provide all the rest of the info from the other fields. I need to eliminate all the duplicates in the First Drop Down as it currently displays an entry for every record, many are identical, I might have over...
3
9359
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where clause after users typed in one or several letters/digits. My problem is as follows Most of the time I need to display form in continuous format, that means the combo box will appear in each record. For example I have a form to let users view...
2
1592
by: Jo Davis | last post by:
access fe and access be. later the be might be sql server I don't want people to pass this application around. And I want control over usage. I want it to 'expire' after a while. I have fairly good control over the install. I have (probably?) prevented unauthorised distribution thus: I have a module which checks the HD partition volume number. If it isn't the
4
1615
by: N J | last post by:
Hi, I ahve developed a program using access and am distributing it using MDE's, I ahve had many requests for a demo. I was thinking of limiting the number of records to say 100? If anyone has any idea's that'd be great, thanks...Nick J --
0
1307
by: Waran | last post by:
Hi, Please look the fields (Insurance, Defense Attorney, Applicant/Plaintiff Attorney) under party list in http://www.reccustodian.com/defensepro/order/neworder.aspx The above said fields are auto suggest textbox like. When you enter some letter on these box, you will get the matches as a dropdown box below the text box. I want to display only the top 25 matches in the drop down. The below function is used to display the matches
3
2516
by: Peter Silva | last post by:
Hi folks, I have a need in a network data distribution application to send out data to folks who want it using the protocol of their choice. I´d like it to support a variety of protocols and I don´t want to implement any of them :-) http, ftp (via ftplib) , https (dunno how yet), ssl, ssh, sftp (via paramiko) The thing is... I want rate-limiting so that in the case of a failure
1
1085
by: Technical | last post by:
Hi, I'm currently working on a webproject with ASP.NET 2.0, Visual Studio 2005, and SQL Server 2005 that allows users to search for and view images. My problems is that I need a way to limit users from directly accessing or linking to the images, but without needing to require users to logon. Currently, the site stores the images in a private directory and uses the database for searches and file path information (I.E. the Image...
1
1405
by: eayoung | last post by:
I am using Access 2003 on a Dell XPS 400 with 512MB of video memory and side-by-side 20" monitors. It's a wonderful way to have the VB code on one side and the Access app on the other - but it has one annoying feature. Access opens TABLES and the design view of MACROS to nearly the width of the display - regardless of the width of the display - and that means I have to drag things where they belong. QUERIES, on the other hand, remain where...
4
1593
WyvsEyeView
by: WyvsEyeView | last post by:
I have a datasheet form in which one field is a combo box that will potentially contain hundreds of records. I've read about several methods of speeding up such combo boxes or limiting their initial contents and I have used those methods on "form view" forms, but they don't lend themselves to datasheet forms. One thing, of course, is to set the Row Source programmatically using the OnEnter event and to limit the Row Source based on a query with...
0
8010
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8483
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
8157
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
6820
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6015
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4030
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2477
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
1607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1336
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.