![]() | |
#11
| |||
| |||
|
|
I have the data in the table once.... when it gets pulled up on the form. it gets checked off complete then I append it to an append table (completed) then it runs an update qry that unchecks the box, makes the due date... the service date plus a frequency but only if the box is checked. If at the end of the week their are items on the list it runs an append query to a table called "not complete" Once the data is in this table it will be used to hand out the beatings.. then it will be updated with another update qry. This data will only remain until the hours and other stats are retreived. Does this make sense?- Hide quoted text - |
#12
| |||
| |||
|
|
On Apr 1, 6:03*pm, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote: Anthony <anthony.cl... (AT) mahr (DOT) com> wrote innews:94dc8bb3-3eaa-4bfb-abcd-4a5 ee38a6017 (AT) 27g2000yqv (DOT) googlegroups.com : My Preventative Maintenance database has a table with Equipment and a table with Services. The primary Key is an auto number field in the Equipment table. To add services such as oil changes, belt change etc. I enter the Equipment# as well as other info. This tabulates a list of services for each piece of equipment on my form. I added some checkboxes so the maintenance department can check off what s been done. On check it fills in Service Date Now() as well as takes a specified amount of time so I can calculate time and time taken. On exit It first runs an append qry that sends my completed items to a service history table. It then runs an update to clear the checkbox as well as taking the Service date adding a frequency to it which now becomes the Due date. And it shows back on the list due for 7 days later if the freq is 7. What I need to do is take any items NOT checked send them to an items not complete table daily. Thing is I can only account for items missed once in the freq. In other words, I have an Item due today, I don t complete it. I send it to my not complete table unfortunately tomorrow when I still do not complete the task and I run the append it will again send the item. So now I have an item that was added to my table 365 times since I append daily. This item is a weekly check so it should not show more than 52 times. *Does anyone understand this??? Can anyone help?? I understand. You have misdesigned the database, using separate tables and append queries, instead of using filtered select queries. Others (imb, Salad and John Spencer, maybe others) *have given the help you need, but you have failed to understand. Essentially, your services completed table and your Services Not complete table violate database design rules. The data is the same in all three tables, the only difference is the ServiceCompleteDate field is filled in or is null. In the case of is null, the difference between upcoming or overdue is the ServiceDueDate is <= or > date() Your database will be much more efficient if you redesign it to use the single table. When your maintenance dept clicks the complete checkbox, run an append query to copy the data (with your date changes) to the same table. When you want to see overdue service you run a select query, when you want to see upcoming service, run a different select query. To see completed service, run a different select query. -- Bob Q. PA is y I've altered my address.- Hide quoted text - - Show quoted text - If I only had one table It would be nuts. I have 843 pcs of equipment and each has a dozen services. Now your talking daily tasks... If I had one table that just kept repeating that amount of data daily it would be unsightly. I have the data in the table once.... when it gets pulled up on the form. it gets checked off complete then I append it to an append table (completed) then it runs an update qry that unchecks the box, makes the due date... the service date plus a frequency but only if the box is checked. If at the end of the week their are items on the list it runs an append query to a table called "not complete" Once the data is in this table it will be used to hand out the beatings.. then it will be updated with another update qry. This data will only remain until the hours and other stats are retreived. Does this make sense? |
![]() |
| Thread Tools | |
| Display Modes | |
| |