If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
No edit previous forms after new form
Hi,
1. I have a data entry form and subform. How can I set for no edits and no deletes of all previous forms and subforms after new form or new record is created? 2. I often encounter loss of records in the database. Does deleting records and compacting database affect this? What are the common causes? Thanks for your time. Ps. I am inexperience in modules. |
#2
|
|||
|
|||
No edit previous forms after new form
On Thu, 18 Feb 2010 14:47:28 GMT, "JACKGUNAWAN" u58266@uwe wrote:
Hi, 1. I have a data entry form and subform. How can I set for no edits and no deletes of all previous forms and subforms after new form or new record is created? ummm... do you really, really want to make it impossible to correct errors in the data? How stringent do you want to be? Making it so the user, working within the form, is prevented from doing so can be accomplished by using the Form's Current event toggles the form's Allow Updates property: Private Sub Form_Current() Me.AllowUpdates = Me.NewRecord End Sub If you're trying to stop someone from intentionally (perhaps maliciously) deleting records, it's much more difficult. 2. I often encounter loss of records in the database. Does deleting records and compacting database affect this? What are the common causes? Deleting records obviously... deletes records, causing a loss of records. Compacting should NOT do so. How are you ascertaining that records are being lost? Directly in the table? Autonumber values will develop gaps, either from deletion of records or just from hitting ESC while a new record is open, before it's saved; this isn't really loss of records. Also if you're looking at a Form, Query or Report, the record might just not be visible because it's filtered out. If you actually have a record that you know was there; nobody intentionally deleted it; and now it's gone from the table, you may have a real problem. 99% of the time, though, someone is (intentionally or accidentally) deleting the record; this can happen when someone thinks they can delete a record from a Query "I'm just deleteing from the query, not from the table" - NOPE! it's deleting from the Table. Thanks for your time. Ps. I am inexperience in modules. -- John W. Vinson [MVP] |
#3
|
|||
|
|||
No edit previous forms after new form
Hi John,
Thanks for the quick reply. Since I am inexperience with codes, where do I place the codes: Private Sub Form_Current() Me.AllowUpdates = Me.NewRecord End Sub Thank you. Jack -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/201002/1 |
Thread Tools | |
Display Modes | |
|
|