Updating fields

duvenhlc

Registered User.
Local time
Tomorrow, 07:21
Joined
Feb 4, 2008
Messages
54
I have a main form with a tree view. There is then a sub form that is queried by clicking on the tree view, to give me some main categories. There is second sub form that is triggered by clicking on the categories, to give me some questions regarding these categories. If I click on the questions is there a pop up form that gives me possible answers to select.

All work fine, the category sub form works has conditional formatting linked to the categories that will change color as one answer the questions. This way one will know which categories is complete. The conditional formatting is triggered by a number calculated in the category query, it will compare the answered vs unanswered questions.

My problem is how I can run this query, in the open form to update the calculation for the conditional formatting. Re-query moves it back to the first record and make it not very user friendly.

I know it is a complicated description, but do any one have an idea how to fix it. It works fine if I click on the treeview and update, I need it to update form the other end as well.
 
I got dizzy trying to follow your explanation :D but here's a hack for doing a Requery and then returning to the record.

Where [UniqueField] is a field unique to only one record.

Where [UniqueField] is Text
Code:
Dim UF_Rec as String
   
   UF_Rec = Me!UniqueField
   Me.Requery
   Me.Recordset.FindFirst "[UniqueField] = '" & UF_Rec & "'"
Where [UniqueField]is Numeric
Code:
Dim UF_Rec as (Fill in number type here)
   
   UF_Rec = Me!UniqueField
   Me.Requery
   Me.Recordset.FindFirst "[UniqueField] = " & UF_Rec
 

Users who are viewing this thread

Back
Top Bottom