Return to first record problem

casreeni

New member
Local time
Tomorrow, 01:47
Joined
May 24, 2011
Messages
5
Hi,
In my launching form there are two dependant combo boxes.one for AREA and the other contains list of offices in this area.The office list changes according to the selection in the AREA combo.This works perfectly with my first record.But when i do this with other records ,as I change the AREA combo and selecting another one the form returns to the first record.I have browsed through many posts to cure the problem.As a beginner I don't get the codes.Please help me to cure this problem using macros and changing properties of the form and combos.My database is in access 2007.
 
Use the "After Update" event on the EVENTS tab of the property sheet for the AREA combo box. Click the " ... " and select create MACRO. This will open the MACRO create space where you need to select the REQUERY action to repopulate the OFFICE list (control to requery).

This assumes the OFFICE list control on your form gets its data (row source) from an "underlying sub-query" you created when you created the OFFICE combo/list box on your form. If not then it really should - to do this go to the DATA tab on the property sheet for the OFFICE combo/list box and in the row source property either enter the sql instructions to select from the underlying OFFICE table or select the " ... " and create the sub-query by showing OFFICE table and dragging the relevant rows to the query fields e.g. AREA, OFFICE, then "build" (right click) selection criteria in the AREA criteria field which filters your OFFICE list based on the AREA combo selection of your launching form.
 
I have already done all this things,(property of 'after update' event of the combo AREA is requery and the combo office woks on the basis of query).As I said in my post my form works properly with first record,But my problem exists,it returns to first record on updation.
 

Users who are viewing this thread

Back
Top Bottom