foxxrunning
Member
- Local time
- Today, 03:14
- Joined
- Oct 6, 2019
- Messages
- 109
I have just started using Access and have come upon this problem. I have a combobox on a form which displays information from a Patients file indexed on a PatientID. The form the combobox is on (Transactionfrm) fills out 4 fields from the Patients table when this code is placed in the on change Event.
Private Sub cboPatID_Change()
Me.txtFirst_Name.Value = Me.cboPatID.Column(1)
Me.txtLast_Name.Value = Me.cboPatID.Column(2)
Me.txtService_Code.Value = Me.cboPatID.Column(3)
Me.txtAmount.Value = Me.cboPatID.Column(4)
End Sub
What I would like to happen is when all the fields are filled in is to save all the fields on the form to the Transaction table. I see that there is no reference to the transaction table in this code but do not have any idea how to do this. Can anyone advise me how this might be done? Thanks for any help.
david
Private Sub cboPatID_Change()
Me.txtFirst_Name.Value = Me.cboPatID.Column(1)
Me.txtLast_Name.Value = Me.cboPatID.Column(2)
Me.txtService_Code.Value = Me.cboPatID.Column(3)
Me.txtAmount.Value = Me.cboPatID.Column(4)
End Sub
What I would like to happen is when all the fields are filled in is to save all the fields on the form to the Transaction table. I see that there is no reference to the transaction table in this code but do not have any idea how to do this. Can anyone advise me how this might be done? Thanks for any help.
david