Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57

    Search Form

    basically im trying to have the person looking for data, type in any part of information of the patient they are looking such as: name dob etc.............. when typed in the Search Form the results go to the Search Results subform then when you find the data you are looking for it suppose to send you to the Patient Data form so they will be able to edit it or to look at all thier information.
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    With a number of optional criteria, I tend to build SQL in code as done in the sample db here:

    http://www.baldyweb.com/BuildSQL.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    yea i have but it doesnt work can you look at the attach file it is in Access 2007

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    For starters, because of the inadvisable spaces in your names you will need to bracket them:

    [File Number]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Oh, and General is a reserved word and will also need to be bracketed.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57

    re:

    ok ill try that

  7. #7
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57

    re

    Ok did that now its asking me to enter a parameter value? Then when i enter in any value it gives me a blank form?

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    What specific steps are required to recreate the error. I just tested and it worked fine.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    Now when you double click on the record that came up it takes me to a blank record. Its suppose to take me to take me to the record i double clicked on on the PatientData form

  10. #10
    goodguy is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Dec 2010
    Location
    Zanzibar, Tanzania
    Posts
    229
    1. Change the line of code where you open the PatientData Form to wrap the value of MRN in single quotes as your MRN field is text.
    2. You are still referring to the MRN control as MRN1 in the new form whereas it is called simply MRN. Change it.
    3. You have unnecessary spaces in the OpenForm command. Remove them.

  11. #11
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    LIKE this
    DoCmd.OpenForm "Patient Data", , , "'MRN' = " & Me.lstCustInfo, , acDialog

    (and i change my patientdata form's name back to patient data already )

    says data type mismatch in criteria expression

  12. #12
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    This demonstrates the correct syntax:

    BaldyWeb wherecondition

    You've got quotes around the field, not the value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    Omggggggggggggggggggg thank you

  14. #14
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Happy to help. Is the issue resolved?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  15. #15
    whojstall11 is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Sep 2011
    Posts
    57
    Yes solved perfect thank you

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. form search
    By ashwin09 in forum Code Repository
    Replies: 2
    Last Post: 10-13-2013, 08:47 AM
  2. Search Form Help
    By carguy37757 in forum Forms
    Replies: 4
    Last Post: 09-16-2011, 11:23 AM
  3. Search Form
    By roger556 in forum Forms
    Replies: 5
    Last Post: 07-16-2011, 02:11 PM
  4. Replies: 9
    Last Post: 02-15-2011, 03:05 PM
  5. Search box on a form.
    By annaisakiwi in forum Forms
    Replies: 3
    Last Post: 01-02-2011, 08:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums