Link to home
Start Free TrialLog in
Avatar of MilburnDrysdale
MilburnDrysdale

asked on

Open pop-up form from id on continuous form

I have a continuous form that has a unique ID (let's call it Ref_num) for each row displayed. I want the user to be able to click a command button next to the row that will open a pop-up form with detail data related to the Ref_num. Can this be done?
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
slight correction from jim's post

docmd.OpenForm "Your popup form", acNormal,,,,acDialog, OpenArgs:=Me.Ref_Num

... then in your popup form's Open event, write code like this ...

If Len(Nz(Me.OpenArgs, "")) > 0 then
   Me.Filter = "Ref_Num=" & Me.OpenArgs
   Me.FilterOn = True
Else
   'No filter ID was passed.  Bail.
   cancel = true
end if
Avatar of MilburnDrysdale
MilburnDrysdale

ASKER

Worked like a charm...thanks!
Thanks for the grade.  Good luck with your project.  -Jim