
Creating an Update to New Record Command Button on Form Based on Multitable Query
Help!
I have a form that uses a multitable query as its recordset. The underlying
tables are patient identifying info (tbl1) that doesn't change by admission
and the other is a table of stuff that does change by admission (tbl2).
tbl1 is the one side of a one:many relationship. The underlying query then
has information from both tables such that if you try to write a simple
copy/pasteappend VBA routine acting on the underlying query, an error
returns stating that a duplicate record has been created (it tries to
duplicate the information in tbl1 that can only have one unique record per
patient). So here's the question, what would the code look like to close
the form open a new query with only the fields in tbl2 for that record,
copy/paste to a new record with an updated date/time stamp, and then reopen
the form pointed to the new record with the multitable query? I'm new to
vba and just can't seem to get it right. Should I be doing this with SQL?
Please shed some light...thanks gg