We help IT Professionals succeed at work.

Why isn't form opening and showing all records

SteveL13
SteveL13 asked
on
Medium Priority
266 Views
Last Modified: 2013-11-05
I have a 2nd form which opens from an onclick event on form 1.  But when form 2 opens it opens to create a new record instead of showing all the records asociated to the key field, "EstN".  EstN is a text field.  Here's my code.  

Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmOutpurchase"
    DoCmd.OpenForm stDocName, acNormal, , "EstN = " & Me.txtRealEstN, acFormEdit
Comment
Watch Question

CERTIFIED EXPERT

Commented:
DoCmd.OpenForm stDocName, acNormal, , "EstN = " & chr(34( & Me.txtRealEstN & chr(34), acFormEdit

Chr(34) = quotes.  Must put quotes around text field criteria

Scott C
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks.  Worked perfectly.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.