Use Caption to find recod

G

Guest

I have a form, frmGENTipText which provides instructions for each Form. I am
trying to open this form and go to the appropriate record using the
ActiveScreen.Caption. "Tip" is a field on frmGENTipText, along with a memo
which holds the instructions, Format: Text.

DoCmd.OpenForm "frmGENTipText", acNormal, "", _
"[Tip]=Screen.ActiveForm!Caption", , acNormal

This opens a blank frmGENTipText.

Is what I matrying to do possible? Perhaps another way to identify the
active screen so that frmGENTipText opens with the rigt record? (Without
adding another field on the active screen)
 
J

Jon Lewis

Try:

DoCmd.OpenForm "frmGENTipText", acNormal, "", _
"[Tip]= '" & Screen.ActiveForm!Caption & "'", , acNormal

i.e. ApostropheQuotes & ...& QuotesApostropheQuotes

HTH
 
G

Guest

Thanks. It failed.

Figured it out like this:

DoCmd.OpenForm "frmGENTipText", acNormal, "", _
"[Tip]= """ & [Caption] & """", , acNormal

Three and 4 "s.

Jon Lewis @btinternet.com> said:
Try:

DoCmd.OpenForm "frmGENTipText", acNormal, "", _
"[Tip]= '" & Screen.ActiveForm!Caption & "'", , acNormal

i.e. ApostropheQuotes & ...& QuotesApostropheQuotes

HTH

Tom Ventouris said:
I have a form, frmGENTipText which provides instructions for each Form. I
am
trying to open this form and go to the appropriate record using the
ActiveScreen.Caption. "Tip" is a field on frmGENTipText, along with a memo
which holds the instructions, Format: Text.

DoCmd.OpenForm "frmGENTipText", acNormal, "", _
"[Tip]=Screen.ActiveForm!Caption", , acNormal

This opens a blank frmGENTipText.

Is what I matrying to do possible? Perhaps another way to identify the
active screen so that frmGENTipText opens with the rigt record? (Without
adding another field on the active screen)
 

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