Synchronise & test data from 2 one-to-many tables in their linking table -
04-10-2004
, 05:13 AM
Hi, I'm trying to build a small database to store info on medical
articles on my computer. I seem to be forced towards VBA but unclear
how to proceed.
I have a problem with adding new data. I have a Subjects form (&
table) & a Specialties form (& table) which are both related
(1-many)to a Subject-Specialty form (& table.)
When I specify a Subject & a Specialty in their relevant forms, I then
want to pre-populate these in the Subject-Specialty form to create a
new relationship ONLY IF this relationship does not already exist.
So my problem is 2-fold:
1. Can I pre-populate the Subject-Specialty form based on both the
Subject in the open Subject form & Specialty in open Specialty form?
(Macros seem to allow opening new form matching only data from one
control on the form with current focus. I have tried to use the
OpenArgs method of OpenForm in VBA but can't seem to include 2 pieces
of data as above, or can't find proper syntax.)
2.I then want to test to see if the particular Subject-Specialty
relationship exists already (if so, cancel operation) or not (if so,
create.)
Any guidance much appreciated |