473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Help with tracking of contracts

15
hi guys. i am just a newbie here. i am currently working on an employee
database using MS access 2003. i wanted to track all the contract dates of a
certain employee. is that possible?

whenever the user would enter a new contract date for a certain employee, it
will not overwrite the previous contract dates, hence it would add up to the
list of the contract dates for that certain employee...

what could be the appropriate SQL statement or VBA command or function for that? i've tried to search for this function, but unfortuntely i wasn't able to find what i've been looking for. i would definitely appreciate all the help you guys can
give. thank you so much.

i tried to create a form and subform with this query


Expand|Select|Wrap|Line Numbers
  1. SELECT tblPosition.PositionName, tblContract.StartDateContract, tblContract.EndDateContract, tblCompany.CompanyName, tblDealer.DealerName, tblOutlet.OutletName FROM (tblOutlet INNER JOIN (tblDealer INNER JOIN (tblCompany INNER JOIN tblPosition ON tblCompany.CompanyIDPK = tblPosition.CompanyIDFK) ON tblDealer.DealerIDPK = tblPosition.DealerIDFK) ON tblOutlet.OutletIDPK = tblPosition.OutletIDFK) INNER JOIN tblContract ON tblPosition.PositionIDPK = tblContract.PositionIDFK WHERE (((tblContract.EmployeeIDFK)=[frmEmployee2].[EmployeeIDPK])); 


but it won't work..

if you want to check the actual ms access file, here is the link:

http://www.gigafiles.co.uk/files/636/human%20resource%20info%20system_2006-10-11.zip

. the name of the form with the subform is frmEmployee2.

thanks a lot and sorry for the inconovenience...
Oct 16 '06 #1
1 1513
PEB
1,418 Expert 1GB
So this is possible using before update or after update event procedure when the date is updated...

You need to run an append query that inserts the new row in the table...

If the current row is with the needed information, so you have to backup the previous date in the database and you need to use the before update event procedure using oldvalue property of your datecontract control...

The query should be

Docmd.runsql "INSERT INTO Yourcontracttables(ourfield1, Your field2, your contractdate) Values (field1,field2,'"+Mecontractdate.oldvalue+"');"

Best regards
Oct 21 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike N. | last post by:
Hello to all: First let me apologize for the length of this question, I've made an attempt to include as much information as is needed to help with the question. I am having problems putting...
7
by: Hal | last post by:
Hi, Please see http://webmonky.myby.co.uk/problem.JPG I have 1 Text Box in a form (ms access), one for an Order # .I currently have the form working so when I enter (or scan) an order number,...
3
by: Kyle Friesen via AccessMonster.com | last post by:
Mike, I have databse that creates a "tracking number" based on the selections made on the form via concatenating. At the end of the tracking number, I need a two digit (01-99) sequence number by...
1
by: irfi | last post by:
Hi All, I am working on a cars investment tracking database and need some help with structure You have investors, who pass the money to company the money in turn purchase cars, sell, and...
1
by: irfi | last post by:
Hi All, I am working on a cars investment tracking database and need some help with structure You have investors, who pass the money to company the money in turn purchase cars, sell, and...
5
by: Newbie! | last post by:
Hi Group, Im trying to Format some coloums on my Datagrid so that only 3 Coloums are show out of the 20 in my Dataset, I just carn`t for the life of me get it to work, i`ve looked everywhere for...
1
by: Nospam | last post by:
I am trying to have an expandable menu each time it's clicked expands, and if it's clicked again, if it is already expanded contracts, and if contracted expands, following this example...
0
by: frogsteaks | last post by:
I have inheireted a database with the following structure and requested enhancement. Any advice on how to accomplish this would be appreciated. All tables are condensed to relevant fields. ...
15
by: jadeverell | last post by:
Hi, I am having a slight (but very annoying) problem with a query I am trying to create. I will try to explain what I am doing as best I can…… I have 3 tables, one is Maintenance contracts, one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.