M
Melissa
According to Access Help, Form.Current Event "Occurs when the focus moves to
a record, making it the current record, or when the form is refreshed or
requeried."
My understanding from this statement is that if I put code in my forms
OnCurrent property, then it should run everytime I Refresh the data, correct?
I believe that is exactly what I've been doing, but it doesn't work for some
of the code I have written in the OnCurrent property. Am I doing something
wrong?
Here's how my form works. I have a subform (e.g. SubFormA and SubFormB as
part of MainForm). The AfterInsert event of SubFormA has the code
Forms!frmMainForm.Refresh
The OnCurrent event of MainForm has the code
Me.SubFormB.Form!Field1.Locked = True
Me.SubFormB.Form!Field2.Locked = True
In my form, the fields in SubFormB are not locking after I've inserted a new
record in SubFormA. The reason I believe that the refresh code is working is
because some data I input in SubFormA is used to update data on the main
form, and once the AfterInsert event is triggered, this data is updated.
Additionally, Field1 and Field2 lock if I go to a different record and come
back but not when I simply refresh the data. Is there a better way to handle
this situation?
a record, making it the current record, or when the form is refreshed or
requeried."
My understanding from this statement is that if I put code in my forms
OnCurrent property, then it should run everytime I Refresh the data, correct?
I believe that is exactly what I've been doing, but it doesn't work for some
of the code I have written in the OnCurrent property. Am I doing something
wrong?
Here's how my form works. I have a subform (e.g. SubFormA and SubFormB as
part of MainForm). The AfterInsert event of SubFormA has the code
Forms!frmMainForm.Refresh
The OnCurrent event of MainForm has the code
Me.SubFormB.Form!Field1.Locked = True
Me.SubFormB.Form!Field2.Locked = True
In my form, the fields in SubFormB are not locking after I've inserted a new
record in SubFormA. The reason I believe that the refresh code is working is
because some data I input in SubFormA is used to update data on the main
form, and once the AfterInsert event is triggered, this data is updated.
Additionally, Field1 and Field2 lock if I go to a different record and come
back but not when I simply refresh the data. Is there a better way to handle
this situation?