There are a lot of resources.
Here are a few sites to see:
http://www.mvps.org/access/
http://allenbrowne.com/tips.html
http://www.lebans.com/
Now, to start you will need a form. The Record Source of the form should be
based on a query that has the fields you need to display information about
the employee for the purpose of entering the contract dates.
You will want to use a Combo Box that is not bound to any field in the
Record Source for the purpose of looking up the employees. Combo boxes have
a row source property. The row source property is similar in nature to the
record source property of a form. It should be a query that has the minimum
number of columns to display the employee name and the employee id. If the
employee id is the primary key of the employee table, it should be the bound
column of the combo. The employee name should be only for display purposes.
On the sites I listed above, you should be able to get details on how to use
a combo to do searches. If not, we can cover that later. First, let's get
the form working.
On your form you will need a subform control. Do not confuse a subform
control with a subform. The subfrom is only another form object. The
subform control is a control object that you put on a form. This allows you
to embed one form into another so you can display information related to the
data on the main form. The subform will have its own record source. In this
case, it will be the contract dates table or a query based on the table.
The subform control has a Source Object property. This is the name of the
subform. It also has a Link Child Fields property and a Link Master Fields
property. These properties are used to relate the employee record to the
contract dates records. In the Link Child Fields, you put the name of the
field (or fields) in the contract date record that relates to the employee
record. In your case, it will probably be the employee id or, if you are
using autonumber primary keys, the foreign key field in the contract date
record that is the primary key value of the employee it belongs to. The same
is true for the Link Master Fields property. It should be the name of the
field in the employee table that relates to the contract date records.
Hopefully, this will get you started. Feel free to post back when you have
more questions. These newsgroups are a really good source of information.
Good Luck.
oh ok.. are there any sites that has sample codes for this? because i am
really new to VBA and MS access...
[quoted text clipped - 8 lines]