Need help with updating a record

L

lushh

we are an HR outsourcing company. we deploy contractual employees to
different companies. we are now developing an employee database. now, i have
an employee form which includes all employee information including their
contracts. what i did was, i created a subform that looks like this:

http://i114.photobucket.com/albums/n258/lushh_16/subformemployee.jpg

the subforms works absolutely fine, but when i ran a query that involved the
contract dates, only the contract dates for a certain employee that were
entered first were returned by the query, and the contract dates that were
entered last, did not appear on the query.. for example, John Smith's first
contract was on March 22, 2005 to September 9, 2005 and his second contract
was on September 10, 2005 to December 17, 2005, the only contract that
appears in the query is March 22, 2005 to September 9, 2005, while September
10, 2005 to December 17, 2005 does not appear on the query. is it possible
that when i enter another contract date on the subform, it will automatically
update the contract date field? i need this function because my boss needs a
report in the database that will generate all the expiring contracts, so that
we can immediately renew the employees' contracts.

thanks a lot and sorry for the inconvenience. just message me if you have
some clarifications.
 
G

Guest

Presumably you've got two tables: one to hold the employee information (one
row for each employee) and one to hold the contract information (one row for
each contract that each employee has).

What are the important fields in those two tables, and what does the SQL for
your query look like? (If you're not familiar with using SQL for queries,
with the query in Design mode, select SQL View from the View menu. Copy what
appears there, and paste it into your reply).
 
L

lushh via AccessMonster.com

Hi Mr. Steele. Thanks for the reply... Here is my query:

SELECT tblEmployee.EmployeeNo AS [Employee Number], tblEmployee.LastName AS
[Last Name], tblEmployee.FirstName AS [First Name], tblEmployee.MiddleName AS
[Middle Name], tblContract.StartDateContract AS [Contract Start Date],
tblContract.EndDateContract AS [Contact End Date], tblPosition.PositionName
AS [Position], tblCompany.CompanyName AS Company, tblDealer.DealerName AS
Dealer, tblOutlet.OutletName AS Outlet
FROM tblEmployee INNER JOIN ((tblPosition INNER JOIN ((tblCompany INNER JOIN
tblContract ON tblCompany.CompanyIDPK = tblContract.CompanyIDFK) INNER JOIN
tblOutlet ON tblContract.OutletIDFK = tblOutlet.OutletIDPK) ON tblPosition.
PositionIDPK = tblContract.PositionIDFK) INNER JOIN tblDealer ON tblContract.
DealerIDFK = tblDealer.DealerIDPK) ON tblEmployee.EmployeeIDPK = tblContract.
EmployeeIDFK
WHERE (((tblContract.EndDateContract)<Now()))
ORDER BY tblContract.EndDateContract;

here is how the form where in i enter the contract details looks like:

http://i114.photobucket.com/albums/n258/lushh_16/subformemployee.jpg

thanks a lot.. have a great day!

Doug said:
Presumably you've got two tables: one to hold the employee information (one
row for each employee) and one to hold the contract information (one row for
each contract that each employee has).

What are the important fields in those two tables, and what does the SQL for
your query look like? (If you're not familiar with using SQL for queries,
with the query in Design mode, select SQL View from the View menu. Copy what
appears there, and paste it into your reply).
we are an HR outsourcing company. we deploy contractual employees to
different companies. we are now developing an employee database. now, i have
[quoted text clipped - 18 lines]
thanks a lot and sorry for the inconvenience. just message me if you have
some clarifications.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top