How to Synch Pop Up With Main

D

doyle60

I have the following code that works to synch a pop up with a main
form. It is in the OnCurrent property of the main form.

If IsOpen("POReminderfrm2") Then
Forms!POreminderfrm2.Filter = "PO = '" & IIf(Len(Me!PO) = 0, "0",
Me!PO) & "'"
End If

My trouble is when I try to ammend this code to work on another main
and pop up, it doesn't work. I believe it has something to do with
the fact that the code above links the two with a text key (PO) and my
new one is linked with a autonumber key. If I am right, I'm not sure
how to edit out the quotation marks. I've tried several things and
failed.

How do I ammend the code for an Autonumber key called QID, with a form
called QualityPerfTestEnlargefrm.

Thanks,

Matt
 
S

Stefan Hoffmann

hi Matt,

How do I ammend the code for an Autonumber key called QID, with a form
called QualityPerfTestEnlargefrm.
Try this:

If IsOpen("QualityPerfTestEnlargefrm") Then
Forms!QualityPerfTestEnlargefrm.Filter = "QID = " & Nz(Me![QID], -1)
Forms!QualityPerfTestEnlargefrm.FilterOn = True
End If


mfG
--> stefan <--
 
D

doyle60

Thanks. Works great. Now I can also synch more than one pop up, which
was another question here.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top