View Single Post
  #15  
Old February 11th, 2010, 04:22 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Show code meaning rather than code value

I tend to use TIC marks for that... G!

Jeff B.

"oldblindpew" wrote in message
...
Sorry, I forget that tongue-in-cheek comments often don't come across as
intended.
Pew

"Jeff Boyce" wrote:

Alternate reasons (other than offending the gods) ... (since the folks
who
respond here are volunteering their time) ...

1) nobody's home
2) nobody knows
3) nobody's available ("busy helping other customers"...)

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"oldblindpew" wrote in message
...
Thanks for reading and replying. I fear I've offended the gods as some
of
my
recent questions have met with silence.

When a new record is added via my form, some of the fields are
populated
from other tables, and this is the data I wish to protect. The key
question
is whether the Before Update event will interfere with the addition of
the
new record and automatic population of certain of its fields. Should
be
easy
enough to try and see. I have not yet needed the different events
other
than
On Click.

In the past I've created a separate form for updating vs. adding. I'm
thinking one cannot simultaneously allow and disallow editing in the
same
form. Perhaps this is why a traditional approach uses modes: Add,
Delete,
Update, and Browse. Obviously I have more to learn.

Thanks Again,
Pew

"AccessVandal via AccessMonster.com" wrote:

oldblindpew wrote:
I also mentioned locking the controls, but this isn't right either.
When I
lock the control, no data can be enterered at all. I don't want to
completely prevent data entry, but I just don't want the user to
accidentally
change anything.

You can use the Textbox beforeupdate event to cancel the input. Like

Private Sub Text1_BeforeUpdate(Cancel as Interger)
If Me.Text1.OldValue Me.Text1 Then
msgbox "You can't change the value"
me.text1.undo
Cancel = True
Else
' do nothing
End If
End Sub

You might also want to deal with the Form's Dirty property.

--
Please Rate the posting if helps you.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201002/1

.



.