Thread: Plz Help Me!!!
View Single Post
Old Apr 12th, 2005, 4:09 AM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Right, the simplest way to interact with the form in VBA is to manipulate the DoCmd object exposed by the navigation controls, required constants can be found through the object inspector or help. To actually add code you'll have to tie it to a VB event handler (right click the object -> build event).
For instance the following code will save the current record:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord
So to go to the next record would be:
DoCmd.GoToRecord , , acNext
and so on. Hope this is helpful.
Rory is offline   Reply With Quote