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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datasheet Question

Status
Not open for further replies.

cpsqlrwn

IS-IT--Management
Jul 13, 2006
106
US
I have a main form with a subform and the subform has a tab control with 4 pages on it. I have a page to add items and quantities to the list, a page to review the list of items, a page to delete items from the list, and a page to edit quantities of existing items in the list. The idea is to be able to edit elements of the subform record until it is correct and then save it.

All the pages work properly except for the edit quantities page. It is a datasheet form. The sheet works properly until I edit the last item in the list. Upon updating the field in the last item in the datasheet, the entire form updates and the current record in the subform moves to a new record. Can someone tell me why this might be happening? Would a solution be to have code in the editable datasheet field that moves to the first record in the list upon updating the last record in the list? If so could someone help me with that code? Thanks for your help!!
 
I have determined that what is happening is that upon leaving the last datasheet row in the edit quantities page the cursor moves to the first subform control. I have disabled and locked the subform controls to prevent additional editing once it had been saved. That is causing the process to move to a new record in the subform. If I could get the edit quantities datasheet to move to the first record in the list upon updating the last record in the list that would solve my problem. Can someone guide me in the code needed to accomplish this? Perhaps an if...then in the after update event for that datasheet control???
 
Have a look at the Cycle property of the Form object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top