A
alekfelstiner
Setup:
Main form (Contacts Form), based on a query of a "Contacts" table, that
returns all contacts. The main form has a search bar at the top. When
contacts are selected, their ContactID shows up as well as the rest of their
information.
A second form (Contact History), based on a query of the "Contact History"
table, which is linked to the "Contacts" table via ContactID. The Contact
History form's underlying query sets the criteria for ContactID to look up
the ContactID control in the Contacts Form. So, I select Contact A on the
Contacts Form, Contact A's ContactID comes up along with the other contact
information, and I can then open the Contact History form and view whatever
records in the "Contact History" table match Contact A's ContactID.
I also want users to be able to create NEW records in the Contact History
table via this Contact History Form, for whatever contact they're reviewing.
If they're looking at two Contact History records for Contact A, I want them
to be able to add a third, with the same ContactID.
When the Contacts Form and the Contact History form are completely separate,
this doesn't work. You can use the navigation buttons to click to a new
record, or use a command button with the Add Record script provided by
Access, but the ContactID which was retrieved from the Contacts Form is not
preserved -- it just empties that control in the form.
When the Contact History form is placed as a subform in the main Contacts
Form, with the ContactID fields linked, the Contact ID does stick around (I
guess because of the linked fields).
I'm happy for the Contacts History form to be a subform, but I really want
it to be a popup -- instead of cluttering up the main Contacts Form
interface. Can someone tell me how to do that?
Or, alternately, I can easily keep the Contact History form separate and
open it as a popup using a command button on the Contacts Form, but I need a
way to preserve the "retrieved" ContactID when creating new records.
Any help would be super-appreciated.
Main form (Contacts Form), based on a query of a "Contacts" table, that
returns all contacts. The main form has a search bar at the top. When
contacts are selected, their ContactID shows up as well as the rest of their
information.
A second form (Contact History), based on a query of the "Contact History"
table, which is linked to the "Contacts" table via ContactID. The Contact
History form's underlying query sets the criteria for ContactID to look up
the ContactID control in the Contacts Form. So, I select Contact A on the
Contacts Form, Contact A's ContactID comes up along with the other contact
information, and I can then open the Contact History form and view whatever
records in the "Contact History" table match Contact A's ContactID.
I also want users to be able to create NEW records in the Contact History
table via this Contact History Form, for whatever contact they're reviewing.
If they're looking at two Contact History records for Contact A, I want them
to be able to add a third, with the same ContactID.
When the Contacts Form and the Contact History form are completely separate,
this doesn't work. You can use the navigation buttons to click to a new
record, or use a command button with the Add Record script provided by
Access, but the ContactID which was retrieved from the Contacts Form is not
preserved -- it just empties that control in the form.
When the Contact History form is placed as a subform in the main Contacts
Form, with the ContactID fields linked, the Contact ID does stick around (I
guess because of the linked fields).
I'm happy for the Contacts History form to be a subform, but I really want
it to be a popup -- instead of cluttering up the main Contacts Form
interface. Can someone tell me how to do that?
Or, alternately, I can easily keep the Contact History form separate and
open it as a popup using a command button on the Contacts Form, but I need a
way to preserve the "retrieved" ContactID when creating new records.
Any help would be super-appreciated.