C
Chris
Hello,
I am working on a database in Access 2007 partially to accomplish a
goal, but also to get familiarity with the new version of Access (I
have done quite a bit of work in the previous versions). Despite
doing a lot of Access work, I am not much of a code burner though I
can usually understand and cannibalize someone else's code. I haven't
found specifically what I am looking for in some searches and thought
someone here would be able to knock out what I am looking for in a few
minutes where it would take me a lot longer to struggle through it.
I have some unbound sub-forms allowing entry of data in look-up tables
that are then used to populate drop-down selections in the main form.
If the user needs to enter a sub-form record and use it on the current
main form record, the form need to be 'reset.' To that end, I am
looking to make a RESET button to 'refresh' the main form (for a bunch
of reasons I would prefer the button method over capture focus changes
or other triggers from the sub-form). The main form presents data in
sort order (alpha on a text field), so just closing and re-opening the
form works for a 'refresh' but usually returns the user on a different
record than the one they were working on. Ok, enough background, here
is what I am think the code needs to accomplish:
· Capture the main form record key (tblMedia.Key_Media - autonumber
numeric) for the current record in the main form (frmMedia).
· Refresh the form (close/open it?).
· Use the key stored in a variable to open the record previously being
worked on.
In my simplistic view this looks to be a straightforward way to
accomplish the refresh as a button.
Thanks in advance for your help and/or code samples.
Chris
I am working on a database in Access 2007 partially to accomplish a
goal, but also to get familiarity with the new version of Access (I
have done quite a bit of work in the previous versions). Despite
doing a lot of Access work, I am not much of a code burner though I
can usually understand and cannibalize someone else's code. I haven't
found specifically what I am looking for in some searches and thought
someone here would be able to knock out what I am looking for in a few
minutes where it would take me a lot longer to struggle through it.
I have some unbound sub-forms allowing entry of data in look-up tables
that are then used to populate drop-down selections in the main form.
If the user needs to enter a sub-form record and use it on the current
main form record, the form need to be 'reset.' To that end, I am
looking to make a RESET button to 'refresh' the main form (for a bunch
of reasons I would prefer the button method over capture focus changes
or other triggers from the sub-form). The main form presents data in
sort order (alpha on a text field), so just closing and re-opening the
form works for a 'refresh' but usually returns the user on a different
record than the one they were working on. Ok, enough background, here
is what I am think the code needs to accomplish:
· Capture the main form record key (tblMedia.Key_Media - autonumber
numeric) for the current record in the main form (frmMedia).
· Refresh the form (close/open it?).
· Use the key stored in a variable to open the record previously being
worked on.
In my simplistic view this looks to be a straightforward way to
accomplish the refresh as a button.
Thanks in advance for your help and/or code samples.
Chris