If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
Private Sub cmd01_Click()
DoCmd.OpenForm "Admissions", , , , acFormAdd
If IsLoaded("Admissions") Then
Forms![Admissions].txtPatientID2 = Me.txtPatientID
this vb coding is to copy data in the patientid field to the patientid field in another form....however i need it to also close the patient form aswell as copy...therefore i all i need is the coding that will close the form once the button clicked!!!