Selasa, 04 Juni 2013

Re: [MS_AccessPros] Form with a Tab-Form - How to link each Tab Record to the Record on MainForm

 

zjubias

The usual way to put the supervisor data in the Employee table is to add a field that is the same data type as the Employee ID. Say Fred is a supervisor and his employee ID is 123. And Fred supervises Sam. Sam's record would have 123 in the supervisor field.

Then you build a query that has the employee table in it 2 times. Join one table's Supervisor field to the other table's Employee ID. The first table would be used to display the employee info and the second table would display only the first and last name. That would be the supervisor.

If none of this makes sense I can upload a little sample for you.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "ZJUbias" <zjubias@...> wrote:
>
> Hello Sir Duane,
>
>
>
> Thank you for your time.
>
>
>
> Ok for tblAddress, I may not include this table anymore, since they want to
> input only the employee's nationality and emergency contact(s). I may just
> include these info into tblEmployee.
>
>
>
> For tblSupervisor, how will I then link the supervisors to each employees.
>
>
>
> For the documents, no, each document(s) were privately own by each
> employee..
>
>
>
> So assuming that my table structure is ok to go, how will I proceed to put
> details on separate tab form and to link to each employee in the main form,
> i.e.;
>
>
>
> Is it something likely to use the empid as the link control to each tab
> form?
>
>
>
> Tab0 - employee info
>
> Tab1 - employee work history
>
> Tab2 - employee documents
>
> Tab3 - employee emergency contacts
>
>
>
> And may main form will be holding the general of employee, like: empid,
> fname, lname, department & reportto.
>
>
>
> Thank you in advance for your help,
>
>
>
> zjubias
>
>
>
>
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Duane Hookom
> Sent: Tuesday, June 04, 2013 8:11 AM
> To: Access Professionals Yahoo Group
> Subject: RE: [MS_AccessPros] Form with a Tab-Form - How to link each Tab
> Record to the Record on MainForm
>
>
>
>
>
> I'm confused by the purpose of the tblAddress since I don't see any fields I
> would expect in the table.
>
> Also, I would not create tblSupervisor but use tblEmployee for employees and
> supervisors.
>
> Can documents belong to more than one employee?
>
> Duane Hookom MVP
> MS Access
>
> > To: MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com>
> > From: zjubias@... <mailto:zjubias%40gmail.com>
> > Date: Tue, 4 Jun 2013 05:45:43 +0300
> > Subject: RE: [MS_AccessPros] Form with a Tab-Form - How to link each Tab
> Record to the Record on MainForm
> >
> > Hello Duane,
> >
> >
> >
> > Thank you for the feedback.
> >
> >
> >
> > So, how do I breakdown my table, should I breakdown something like;
> >
> >
> >
> > tblEmployee:
> >
> > EmpRecNo (A/N)
> >
> > EmpID
> >
> > DeptID
> >
> > SupervisorID
> >
> > FName
> >
> > LName
> >
> > BOD
> >
> > DateHired
> >
> > Position
> >
> > EmpNotes
> >
> >
> >
> > tblAddress:
> >
> > AddrRecNo (A/N)
> >
> > EmpID (fk)
> >
> > Country
> >
> > Nationality
> >
> > CountryPhone
> >
> > EmergencyPhone
> >
> > EmergencyContact
> >
> > AddrNotes
> >
> >
> >
> > tblWorkHistory:
> >
> > WHRecNo (A/N)
> >
> > EmpID (fk)
> >
> > Company
> >
> > Position
> >
> > Year
> >
> > WHNotes
> >
> >
> >
> > tblDepartment:
> >
> > DepRecNo (A/N)
> >
> > DeptID
> >
> > DeptName
> >
> > DepNotes
> >
> >
> >
> > tblSupervisor:
> >
> > SprID (A/N)
> >
> > SprFName
> >
> > SprLName
> >
> > SprNotes
> >
> >
> >
> > tblDocuments:
> >
> > DocRecNo (A/N)
> >
> > DocID - (this will reset per employee)
> >
> > EmpID
> >
> > DocDescription
> >
> > DocFrom
> >
> > DocDate
> >
> > DocCopy (scanned copy)
> >
> >
> >
> >
> >
> > Thank you for feedback
> >
> >
> >
> > zjubias
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > From: MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com>
> > [mailto:MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of Duane
> Hookom
> > Sent: Monday, June 03, 2013 11:04 PM
> > To: Access Professionals Yahoo Group
> > Subject: RE: [MS_AccessPros] Form with a Tab-Form - How to link each Tab
> > Record to the Record on MainForm
> >
> >
> >
> >
> >
> > zjubias,
> >
> > This is basic Link Master/Link Child functionality of the subform control.
> > Set the properties to the appropriate fields and then sit back and enjoy.
> >
> > Duane Hookom MVP
> > MS Access
> >
> > ----------------------------------------
> > > To: MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com>
> > <mailto:MS_Access_Professionals%40yahoogroups.com>
> > > From: zjubias@... <mailto:zjubias%40gmail.com>
> <mailto:zjubias%40gmail.com>
> > > Date: Mon, 3 Jun 2013 22:55:09 +0300
> > > Subject: [MS_AccessPros] Form with a Tab-Form - How to link each Tab
> > Record to the Record on MainForm
> > >
> > > Dear All,
> > >
> > >
> > >
> > > I was given a project to create an Employee Database to store personal
> > data,
> > > work history, document related to her/his employment (something like
> > warning
> > > memo, medical report, etc..
> > >
> > >
> > >
> > > Now, am conceptualizing how am going to present the employee record on
> one
> > > screen/form and it came to my mind to use a Tab Form, but a big question
> > pop
> > > up over, how could I establish a link between my main form having
> > > employeeid, department, supervisor as the main control in my main form.
> > How
> > > could I link each tab to make sure that all the records in each tab is
> > only
> > > related to the current employee shown on the main form..
> > >
> > >
> > >
> > > Can someone please show me how to do it.
> > >
> > >
> > >
> > > Thank you in advance,
> > >
> > >
> > >
> > > zjubias
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (17)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar