invoke a button click (OfficeXP - Access2002)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a more sure method of programmatically clicking a command button
than the use of the SendKeys method? I'm a contractor called in to fix some
glitches, but the overall database is heavily (and properly) coded and I
would just as soon "hitch a ride" to the button's existing code which is not
in need of any alterations. There are many user sensitivity issues as well,
so I must watch how I tread on their turf.

This event needs to happen when the SEARCH form closes. The GO button sits
on the WORKSTATION form which is always already loaded at this point of the
process.

Thanks
 
You can call event procedure code much like you would call any other
procedure.
From anywhere on WORKSTATION (and assuming GO is really named cmdGO):
cmdGO_Click
will call the code assigned to the cmdGO_Click event.

If you need to call it from a different form, you'll probably need to change
cmdGO_Click from Private to Public and specify what you want (aircode):
Call Forms("Workstation").cmdGO_Click
 
Back
Top