Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

History Table: Update Posted Wrong Question..Sorry

Status
Not open for further replies.

rgomez1999

Technical User
May 25, 2000
66
US
I posted a question last week but did stated my question wrong.&nbsp;&nbsp;Here's the new information.<br><br>I'm working on a project where clients come everyday to see the doctor at our facility.&nbsp;&nbsp;On my form I have a field called DateOfVisit with the source as being =Date() which puts in today's date (PC Date).&nbsp;&nbsp;What I'd like is that<br>once I use my Find Record combo box to lookup a client is for the DateVisit to automatically keep a history of this visit into a history table.&nbsp;&nbsp;Therfore, when I run my EndOfDay report on the number of visits of both past and present for all the clients or just a specific client (i.e. John Doe visited 15 times in May 2000 and these are the dates of visits) I'd like Access to give me the<br>results based on a query that I will create from this History table.<br><br>What I've done so far:<br><br>I&nbsp;&nbsp;created a separate table called tblHistoryVisits (primary key is PatientID)and on the Main table where I keep all the clients personal records the primary key for that table is also PatientID.&nbsp;&nbsp;Note, the DateOfVisit is on the Main table with a date field of =Date().&nbsp;&nbsp;I also added a DateOfVisit field to the tblHistoryVisits table and created a relationship between both PatientID and used the Enforce Referiental Integrity with Cascade Update and Delete. However, when I go to the tblHistoryVisits there's nothing there.<br><br>(CODES WILL BE OF A GREAT HELP)<br><br>Any help is GREATLY appreciated.<br><br>Thank you.<br>
 
i think you have some wrongs in your tables structure, so i suggest you to do the follwing...<br>1)main table,<br>&nbsp;PatientID&nbsp;&nbsp;&quot;primary key&quot;<br>&nbsp;patientName<br>&nbsp;and so on, but don't make a field for DateOfVisit in that table<br><br>2)tblHistoryVisits,<br>&nbsp;&nbsp;PatientID&nbsp;&nbsp;&quot;realtion one to many with main table&quot;... it shouldn't be the primary key, you will use a combobox to select a patient.<br>&nbsp;&nbsp;DateOfVisit <br><br>by creating the one to many realtion between these two tables, you can make a form with a subform... the form will show the patient's personal information, while the subform will take care of the DateOfVisit...<br><br>i hope this will help u, any problems pls fell free to tell me.<br> <p>Mohamed Aly<br><a href=mailto:samara_79@hotmail.com>samara_79@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top