Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do this in the Current event ?

Status
Not open for further replies.

saustin

MIS
Feb 19, 2001
336
US
Hi All,
Need to run some custom code every time a record changes in a form. Thought the Form.Current event was the place to put this BUT after doing some debugging it does not seem to fire after a new record is displayed. What is up with that ? Or, am i just missing the obvious and am putting this code in the wrong place. Any ideas greatly appreciated, thanks Steve.
 
Hi Mp9,
Darn, was afraid of that. Even running .....

Debug.Print "Hi steve you should really be on a new record"

will not display in the immediate window after the next record is up on the screen.
Have four subforms on the form but do set the focus back to the main form after pressing the next record. Am stumped.
 
Just to double-check, especially if you've written thte form's Current event code manually... if you select the form in design view, does the OnClick Event have
Code:
[Event Procedure]
showing in the properties window? If not, this would be why your code isn't running. [pc2]
 
Hi mp9,
You were right on, the [Event Procedure] was not showing up. But added it and it still does not work. Have a next button on the screen with DoCmd.GoToRecord , , acNext
in vba. Shouldn't the current event fire after the next record appears ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top