Results 1 to 3 of 3
  1. #1
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183

    Search Function

    So I have a search form called ‘fdlgSearchPatient’


    It is a search-as-you-type function. The function works fine so far.


    Now I added EDIT and ADD NEW button but I don’t know how to link it.
    I would like the FrmAuditTool to be pulled up when the user hit EDIT and frmNEW when the user hit ADD NEW button.

    How do I make this work? The search as you type codes were simply copied from an online example.



    Please see the attached file for what I have created so far.
    Thanks!

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Firstly, why do you need those two extra forms? If you use tblAudit as your record source for the subform then you won't need either of those two buttons. You can allow the user to edit as well as add new directly on the subform.

    Otherwise, OnClick for the two buttons, open the form (VBA - or use a macro)
    DoCmd.OpenForm "formname"

  3. #3
    sk88 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2011
    Posts
    183
    Quote Originally Posted by aytee111 View Post
    Firstly, why do you need those two extra forms? If you use tblAudit as your record source for the subform then you won't need either of those two buttons. You can allow the user to edit as well as add new directly on the subform.

    Otherwise, OnClick for the two buttons, open the form (VBA - or use a macro)
    DoCmd.OpenForm "formname"

    The reason I have two forms is because one when open takes the user to NEW FORM.. whereas one is linked to the old data.

    Basically to prevent users from going to EDIT form and add NEW within the EDIT FORM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem with search function
    By sk88 in forum Access
    Replies: 2
    Last Post: 12-20-2011, 01:05 PM
  2. Creating a search function
    By jlclark4 in forum Forms
    Replies: 7
    Last Post: 12-30-2010, 02:03 PM
  3. Search function in forms
    By vCallNSPF in forum Forms
    Replies: 1
    Last Post: 03-14-2010, 06:17 PM
  4. search function
    By Eric1066 in forum Access
    Replies: 0
    Last Post: 10-23-2009, 10:23 AM
  5. search,view and open function
    By blurboy84 in forum Reports
    Replies: 0
    Last Post: 10-08-2009, 11:42 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