We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
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.
|What is the VBA syntax for Refreshing the form in the After Update event of one of its controls ?||11||41|
|Access 2010 - Open New Form-Add Record-Close NewForm-Update Orginal Form Field Fron New Form||15||36|
|chrome says SHA256 algorithm is weak even after i configure my website to use SHA256 certificate||5||36|
|MS Access Not Responding When Looping Through Code But is Fine Need Suggestions For Loading Screen etc...||7||19|