Haha..this has been going on so long my friend that I forgot exactly what I did to this DB Sample.
In any case....here is your DB back to you modified.
Uhhh...Yes. Good thing I wrote Txt file of what I did
THE UPDATE FORM
- Changed the Reference to Microsoft Outlook 11 Object Library to Microsoft Outlook 10 Object Library because I do not have 11. You can change this back to 11.
- Removed all the Recorset requests from the 'lanid_AfterUpdate' event and used one recordset instead. This way it can be closed and cleared from memory properly.
- Added 'Option Explicit' to the Declarations section of the Update Form so as to ensure Variables and Objects are properly declared.
- Added a Multi-Dimensional Array (CtrlArray) to the Declarations section of the Form's code module.
- Added code to the 'lanid_AfterUpdate' event to fill the above Array when a Lan ID is selected. This is so that the contents of the controls can be compared in order to see if a change was made.
- Removed the Min/Max and Close buttons from the Form. This forces the Form to be closed by the Close Button located on the Form and allows us to control the CLOSE better.
- Added the 'IsSaved' Boolean Variable to the Declarations section of the Update Form so as to determine if the 'Update' button was selected. This variable is set to True when the 'Update' button is selected and set to False when a new Lan ID is selected.
- Changed the code within the 'Clear Form' command button's OnClick event. Placed in a For/Next loop to enumerate through Form controls and set them to Null rather then listing each control on Form and setting the value to those controls to Empty String. More effeiciant with a For/Next Loop.
- Indented code within the Update Form's code module. This makes code MUCH easier to read and work with. This would be a real good habbit to get into.
- Added code within the OnClick event for the 'Goto Insert Form' button to check and see if data was modified.
- Added code within the OnClick event for the 'Goto Search Form' button to check and see if data was modified.
- Removed all the Calendar controls on Form and replaced with a Form Style Calendar. The Calendar Control is troublesome at the best of time and it gobbles resourses. It also requires stringent References to the Control should he Database move from on Computer to another. It s best to avoid the Microsoft Calendar Control (in my opinion). A Database Code Module was added to accommodate the new Calendar. A different Calendar Image was also used. ALSO, I removed the Code in Form pertaining to the Old Calendar controls. You will notice that not near as much code is required in Form.
- Added a Dynmaic INSERT query to the OnClick event of the 'Update' button so as to log the data changes to Form Controls into the AuditLog Table.
- Created a 'AuditLog' Form so that you can easily view the Audit. This Form obviously shows when a Record is Created but it also shows a list of Fields that have been updated from the 'Update Form'. Update some records then open the AuditLog Form. Navigate to the last records in the set and you will see which fields were modified, the original field data value and the new data value saved. I believe tis is what you were looking for
==================================================================================
DATE OF EXPIRY
- Created a Startup Tmer Form which is hidden from view. This Form contains an active timer which will cycle every 30 minutes at which point the Table is checked for Expired Queries. If any are found then the User is notified via Message Box of the number of Expired Queries.
- Added an additional Text Box and Label to the 'Update Form' which indicates the number of days remaining before the currently visible Query is expired. If the Query is Resolved then nothing is displayed. The TextBox which displays the Number Of Days Remaining also contains Conditional Formating. If the number of Days Remaining is 8 and above days then the Text is black on white background. If the Days Remaining is between 2 and 8 Das (3 to 7) then the Text is White on a Blue Background. If the Days Remaining is 2 days or less then the text color is Yellow on a Red background. Looking at this Form and the code therein (within the
OnClick event for the 'Update' button) you should be able to implement or change things the way you want or apply it to other Forms.
That should keep you busy.
.