MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub cmdAdd_Click() On Error GoTo Err_Add Dim rst As DAO.Recordset Dim strOpenToPatient As String Dim uniqueID As String 'hold the uniqueID for the record Const cPatientForm = "frmViewPatientHistory" strOpenToPatient = "MRN=""" & MRN & """" 'set uniqueID to the generated uniqueID uniqueID = generateID(Antibotic.Value, Frequency.Value, Month(DateOrdered.Value), day(DateOrdered.Value), year(DateOrdered.Value), FIN.Value, AdmitDate.Value) 'set the recordset to the admission table Set rst = CurrentDb.OpenRecordset("tblPatientAdmissions", dbOpenDynaset) 'loop through each of the admission and add them to the recordset With rst ' .AddNew 'open the addnew event to add the record details ![Assessment_ID] = uniqueID ![FIN] = FIN.Value ![Antibiotic] = Antibiotic.Value ![Frequency] = Frequency.Value ![Date_Ordered] = DateOrdered.Value ![Time_Ordered] = TimeOrdered.Value ![AdmitDate] = AdmitDate.Value ![DischargeDate] = DischargeDate.Value .Update 'update the record in the table End With If PatientFieldsFilledIn() Then DoCmd.RunCommand acCmdSaveRecord MsgBox "Patient Changes Successfully Saved" DoCmd.Close
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|MS Access How To Run a Macro From Task Manager...Not With AutoExec...I Need To Call A Public Sub||3||45|
|usage of ms/excell 3d maps in ms/access 2016||6||40|
|Need Help ASAP - Access Module VBA Run Time Error 3141||5||35|
|Reoccurring Access Query||24||44|
Join the community of 500,000 technology professionals and ask your questions.