N
Nicholas Scarpinato
I have a text box control on a form which is normally updated by the user.
However, there are instances where a generic code is used in this field, and
I have a button on the form that the user clicks to populate that control
with the generic code. My problem is I have code in that text box control's
AfterUpdate event that does not fire when the text box is updated by the
command button's code. This is the underlying code of the command button (it
pops up a form which updates the field in the main form... this is the code
from that second form):
Private Sub Command24_Click()
DoCmd.SelectObject acForm, "Returns Entry Form"
Forms![Returns Entry Form].[PODField] = "000000/0000#" & Me![Frame5].Value
Forms![Returns Entry Form].[PODField].SetFocus
SendKeys "{ENTER}"
DoCmd.Close acForm, "MiscPOCodes"
End Sub
I've tried selecting the field and doing a SendKeys to it, but that doesn't
seem to work either. I need this to work to help cut down on entry time,
otherwise my users will have to remember these codes and type them in every
time they need them (which is quite often).
However, there are instances where a generic code is used in this field, and
I have a button on the form that the user clicks to populate that control
with the generic code. My problem is I have code in that text box control's
AfterUpdate event that does not fire when the text box is updated by the
command button's code. This is the underlying code of the command button (it
pops up a form which updates the field in the main form... this is the code
from that second form):
Private Sub Command24_Click()
DoCmd.SelectObject acForm, "Returns Entry Form"
Forms![Returns Entry Form].[PODField] = "000000/0000#" & Me![Frame5].Value
Forms![Returns Entry Form].[PODField].SetFocus
SendKeys "{ENTER}"
DoCmd.Close acForm, "MiscPOCodes"
End Sub
I've tried selecting the field and doing a SendKeys to it, but that doesn't
seem to work either. I need this to work to help cut down on entry time,
otherwise my users will have to remember these codes and type them in every
time they need them (which is quite often).