Hiya,
I am kind of a novice at this and I think there might be a very easy
solution to this that I am missing...
I have a form that we fill out for a patient's medication use. The
underlying table has the pt id, and visit id and then the meds (type,
dosage, route etc... for up to 8 meds.) So when the form pops up for a
specific patient there are 8 "pages"/rows with the first being the
first visit... 8 visits total.
On their second visit their med use is almost always the same as the
first visit. What is an easy way to autofill the second visit med use
with the first visit info?
Thanks,
Gordo
pietlinden@hotmail.com - 21 Feb 2005 19:37 GMT
> On their second visit their med use is almost always the same as the
> first visit. What is an easy way to autofill the second visit med use
> with the first visit info?
>
> Thanks,
> Gordo
One way would be to get the ID of the first visit and then grab the
child records from it and insert them with the updated visit info
(second visit). So, create a query that grabs the meds info from the
previous visit. Turn it into an append query, but with the current
visit's ID. (You should be able to point the query at the form you have
open.) Then run the query. Test it out in a dummy database, then when
you're sure it works, do the usual - turn warnings off, run append
query, turn warnings back on, requery subform recordsource etc.
Gordo - 21 Feb 2005 20:39 GMT
I had this idea, but I thought there might be a simpler solution.
How would I "point the query at the form"??
pietlinden@hotmail.com - 22 Feb 2005 02:34 GMT
SELECT ....
FROM ....
WHERE IdentifierField=[Forms]![MyFormName]![MyControlName]
and make sure the form is open when you run it....
Gordo - 22 Feb 2005 18:38 GMT
Excellent... thanks so much!
Steve - 22 Feb 2005 02:48 GMT
You could do it by hand with "CTRL-'" (That's control and apostrophe)
- which copies the data from the row above...
Steve
> I had this idea, but I thought there might be a simpler solution.
>
> How would I "point the query at the form"??