A
Andrew Meador
I have a main form (in Access 2007) with a few fields for the user
to fill in. Below the data entry fields is a subform that lists all
the records from the same query the main form is based on. This is to
make it easy for the users to see the current record set as well as a
quick way for them to select records for editing. I want to make it so
that if the user clicks on a subform record, the main form will go to
that record for editing.
So far I put a hidden textbox on the main form and set it's Control
Source to "=[Subform]![RecID]. The textbox is updated with the RecID
selected. The problem I'm having now is that I can't figure out how to
use this value to update the current record the main form is showing
to match that RecID. I'm particularly hung up on the events for the
text box. I can't get any of the following events to fire: Before
Update, After Update, On Dirty, or On Change. I have code that should
respond to all of those events that just pops up a message box to see
if the code is executing, but none of them do. So, the textbox is
being updated, but I can't get an event to fire so as to do anything
with the value.
Anyone have an explanation as to why these events aren't firing?
Anyone have a different approach to this?
Thanks!
to fill in. Below the data entry fields is a subform that lists all
the records from the same query the main form is based on. This is to
make it easy for the users to see the current record set as well as a
quick way for them to select records for editing. I want to make it so
that if the user clicks on a subform record, the main form will go to
that record for editing.
So far I put a hidden textbox on the main form and set it's Control
Source to "=[Subform]![RecID]. The textbox is updated with the RecID
selected. The problem I'm having now is that I can't figure out how to
use this value to update the current record the main form is showing
to match that RecID. I'm particularly hung up on the events for the
text box. I can't get any of the following events to fire: Before
Update, After Update, On Dirty, or On Change. I have code that should
respond to all of those events that just pops up a message box to see
if the code is executing, but none of them do. So, the textbox is
being updated, but I can't get an event to fire so as to do anything
with the value.
Anyone have an explanation as to why these events aren't firing?
Anyone have a different approach to this?
Thanks!