Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
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.
Join the community of 500,000 technology professionals and ask your questions.