Home » Developer & Programmer » Forms » how can assign employee (xp , )
how can assign employee [message #526681] Wed, 12 October 2011 07:43 Go to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
Assign employees to their jobs in consideration the maximum number of employees to each jobs is 5 employee plus each job has own the maximum number of employees

we need the maximum number of employees for each job 5 to be variable when need to change this maximum for certain job , change this number from database (form the from of job ) not form code )
tables
emp
emp_no
name
manager
hiredate
salary

job
job_no
job

you can add tables or attributes to tables to complete you business
Re: how can assign employee [message #526716 is a reply to message #526681] Wed, 12 October 2011 10:53 Go to previous messageGo to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
please some body help me
Re: how can assign employee [message #526719 is a reply to message #526681] Wed, 12 October 2011 11:07 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
Your requirement is not at all clear.
Are you trying to design a form? A DB procedure? Something else?

hassan08 wrote on Wed, 12 October 2011 13:43
plus each job has own the maximum number of employees

Where is that defined?

hassan08 wrote on Wed, 12 October 2011 13:43

we need the maximum number of employees for each job 5 to be variable when need to change this maximum for certain job , change this number from database (form the from of job ) not form code )

I have no idea what that means.

hassan08 wrote on Wed, 12 October 2011 13:43

you can add tables or attributes to tables to complete you business

This is homework isn't it?
Re: how can assign employee [message #526720 is a reply to message #526719] Wed, 12 October 2011 11:10 Go to previous messageGo to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
yes this is design a form and tried more than times but i can't solve it
Re: how can assign employee [message #526722 is a reply to message #526720] Wed, 12 October 2011 11:31 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
And the rest of my questions?
Re: how can assign employee [message #526723 is a reply to message #526722] Wed, 12 October 2011 11:35 Go to previous messageGo to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
it's only required design form and after design the forms make this validation at the forms
Re: how can assign employee [message #526724 is a reply to message #526723] Wed, 12 October 2011 11:40 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
So what's stopping you from designing the form?
I'm not going to design a form for you. I very much doubt anyone else here will either.
We will happily help with specific technical problems.
Re: how can assign employee [message #526725 is a reply to message #526724] Wed, 12 October 2011 11:44 Go to previous messageGo to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
no i mean how can design the relation between the tables
tables
emp
emp_no
name
manager
hiredate
salary

job
job_no
job
are emp_no will be pk
and job_no will be pk in table emp and job_no in table job will be fk
are this relation true or false i want you help me to design the relations between the tables and we can add any tables if case want do that
Re: how can assign employee [message #526729 is a reply to message #526725] Wed, 12 October 2011 13:47 Go to previous messageGo to next message
John Watson
Messages: 8941
Registered: January 2010
Location: Global Village
Senior Member
Take it slowly, Hassan. Your last post gives a good starting point. You need to create two tables, call them EMP and JOB. Write the CREATE TABLE statements, with the definitions of each column. Then add the constraints with ALTER TABLE...ADD CONSTRAINT... You need to add a primary key constraint to each table, and a foreign key constraint to the EMP table. When that is done, we can look at what comes next.
Re: how can assign employee [message #526735 is a reply to message #526729] Wed, 12 October 2011 14:08 Go to previous messageGo to next message
cookiemonster
Messages: 13931
Registered: September 2008
Location: Rainy Manchester
Senior Member
As John says, slow down. You need to do this a bit at a time.

Quote:

and job_no will be pk in table emp

I would have thought job_no should be pk in job not emp. If it's not what is?
Re: how can assign employee [message #526749 is a reply to message #526735] Wed, 12 October 2011 15:15 Go to previous message
Littlefoot
Messages: 21817
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
JOB_NO would be a foreign key in EMP, referencing records stored in JOB.
Previous Topic: Numeric input in forms
Next Topic: Setting the update_allowed property of specifc record in a block to false
Goto Forum:
  


Current Time: Sun Aug 11 08:59:59 CDT 2024