Split Form event "On Data Change"

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!
 
J

John W. Vinson

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
 
N

NeoFax

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.
 
J

John W. Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top