Split Form event "On Data Change"

  • Thread starter Thread starter NeoFax
  • Start date Start date
N

NeoFax

I would like to update a field with today's date when any data is
changed on that record. However, the "On Data Change" event does not
seem to work on split forms. Can someone enlighten me? Also, how do
I set certain text boxes to locked so they appear "greyed" out and can
only be viewed but not changed? Thanks!
 
I would like to update a field with today's date when any data is
changed on that record. However, the "On Data Change" event does not
seem to work on split forms. Can someone enlighten me?

Use the form's BeforeUpdate event instead.
Also, how do
I set certain text boxes to locked so they appear "greyed" out and can
only be viewed but not changed? Thanks!

Set the textbox's Enabled property to No.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Thanks! Those worked perfectly! Now to figure out how to use a
filter from a main form to this form to limit what info shows up.
 
Thanks! Those worked perfectly! Now to figure out how to use a
filter from a main form to this form to limit what info shows up.

Look at the Help for the "OpenForm" method. It has a WhereCondition argument
that lets you specify the criteria which limit the info; e.g.

DoCmd.OpenForm "frmMyForm", WhereCondition := "[UserID] = 123"

This can of course be generated in code.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
Back
Top