Refresh

duvenhlc

Registered User.
Local time
Today, 12:58
Joined
Feb 4, 2008
Messages
54
I requery a form when a "pop up" form closes, on the "close" command. How do I then reurn to the original selected recordset on the main form? The reocord I used to open the "pop up", it returns to the first record when I requery. Refresh is not working, since the main form needs to do a calculation on the requery command.
 
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

But let me ask; are you doing the Requery just to get the calculation done? If so you can use Me.ReCalc instead.
 

Users who are viewing this thread

Back
Top Bottom