A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

No edit previous forms after new form



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 02:47 PM posted to microsoft.public.access.forms
JACKGUNAWAN
external usenet poster
 
Posts: 1
Default 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  
Old February 19th, 2010, 01:31 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old February 20th, 2010, 01:57 AM posted to microsoft.public.access.forms
JACKGUNAWAN via AccessMonster.com
external usenet poster
 
Posts: 7
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.