Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oversdue caluculations

Status
Not open for further replies.

Ev

Technical User
May 28, 2000
8
GB
I'm currently designing a database based around a vide store. Can anyone please tell me or provide me with appropriate code for how i will be able to 1 log the date that a video is taken out and 2 calculate the cost of the video once it is ruturned if it is £1.99 for the first night and then 99p afterwards<br><br>Also an if statement if the video is more than 4 days overdue<br><br>Thanks<br><br><A HREF="mailto:chrisdrewery@hotmail.com">chrisdrewery@hotmail.com</A>
 
without using VBA code,<br><br>In the field Dateout put = now() in the default value property this will give current date and time as record is created without having to type it in<br><br>you will need a dateback field also. <br><br>IIF([dateback]-[dateout] &gt;4,&quot;More then 4 Overdue&quot;,&quot;not&quot;)<br><br>to compute cost: IIF([dateback]-[dateout] &gt;1,1.99 + ([dateback]-[dateout]-1)*.99,1.99)
 
OK dan so far so good the dateout field is working fine, bu the problem now lies where do I paste the rest of the code? <br><br>I currently have one table called video transactions which the checking out of the video takes place, do I add the dateback field here aswell? If so how can i stop it from loading up the dateback staraight away? can I do this via a button?<br><br>Also I'm a bit confused to ware the rest of the coding goes, If possable can you give more details please<br><br>Cheers<br><br><A HREF="mailto:CHRISDREWERY@hotmail.com">CHRISDREWERY@hotmail.com</A><br>
 
Yes the dateback field needs to be part of a table.<br>Most of the other actions need to happen on a form or a query.<br>If you are attempting to do this database in one table you are going to have problems. I suggest you got through the Access help file. Then where to use this info will be clearer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top