Sola
Registered User.
- Local time
- Today, 08:58
- Joined
- Jun 1, 2007
- Messages
- 14
Hi, I am looking for some help with VB code.
I have a form that lists prescriptions. One of the fields, fldTransactionType, has two options: "Prescribed Rx" and "Voided Rx." In this form that I am working on, the user sees a list of all prescriptions, and I have a button in each row that says "Void This Rx."
What I want is for the user to be able to press the button and the following happen: fldTransactionType is reset to "Voided Rx," the record is saved and the form is refreshed (so the record is updated to say "Voided Rx" and the user can visually see that the change has been made).
I know how to save the record and refresh the form, but I am at a loss as to how to change the value to "Voided Rx." My VB experience so far is with using DoCmd, OpenForm, etc. I have not really tried tinkering with changing values before. I tried btnVoidRx.RowSource="Voided Rx" but that did not work. Can anyone help me figure out VB command I should be using?
I have a form that lists prescriptions. One of the fields, fldTransactionType, has two options: "Prescribed Rx" and "Voided Rx." In this form that I am working on, the user sees a list of all prescriptions, and I have a button in each row that says "Void This Rx."
What I want is for the user to be able to press the button and the following happen: fldTransactionType is reset to "Voided Rx," the record is saved and the form is refreshed (so the record is updated to say "Voided Rx" and the user can visually see that the change has been made).
I know how to save the record and refresh the form, but I am at a loss as to how to change the value to "Voided Rx." My VB experience so far is with using DoCmd, OpenForm, etc. I have not really tried tinkering with changing values before. I tried btnVoidRx.RowSource="Voided Rx" but that did not work. Can anyone help me figure out VB command I should be using?