Results 1 to 11 of 11
  1. #1
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37

    how to make search data that also can be edited?

    hye,

    i'm new in access..i have a problem regarding how to search data using query that can also be edited by user..
    right now, i've already make query to search the data and it will came out as a report. so, i want add one new button to make data be edited once user search the data..

    how i'm gonna do this??
    can somebody help me to give any idea or solution to my problem..??

    your help is much appreciate..


    tq..

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    Data shown in a report cannot be edited. You will want to return your search results in a form. Now depending on whether that form is based on a table or query will govern whether the data can be edited. If the form is based on 1 table, the information can be edited. If a query is used, it will depend on the types of joins used or whether the query is an aggregate query.

  3. #3
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37
    hye jzwp11,

    thankz for reply..
    if i use query, how can i make the search function and can be edited..??
    for example i can make the button for run query, and is't possible user can edit the data in query??
    i do not know the coding that i need to write in the query criteria..
    before this, i'm using this code

    Like [Forms]![searchForm].[qregion1] & "*"

    qregion1 is my text box that i put in form, so when user select any word, it will search anything that relating with the word that user enter.
    but unfortunately, after i added that code, some of my data that i put in table is missing.
    the data that in my table is not same with the data in the query..

    how can i solve this problem..??huhu..
    tq..

  4. #4
    chuki2 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    Selangor,Malaysia
    Posts
    26
    Nurul, maybe you can use the combobox to replace text box...

    And row source take from the table

  5. #5
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37
    chuki2..

    basically in my search form, i have 5 combo box and 1 text box..
    my fault for saying qregion1 is text box but it's combo box actually...

  6. #6
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    For each of the combo boxes, you would have to add criteria for each of the fields to which those combo boxes apply but you would not use LIKE or *; it would simply be forms

    = [Forms]![searchForm].[qregion1]

    Now Access will interpret the various criteria with AND so the SQL text (click on the SQL view) would look something like this

    WHERE yourfieldname1=[Forms]![searchForm].[qregion1] AND yourfieldname2=[Forms]![searchForm].[x] AND ...

    The query will return results where all conditions meet what is selected in each of the combo boxes. I do not know if that is what you want. You could also change the AND to OR and that will yield different results (if any of the conditions are met)

    And yes, you can run the query and the user can edit the data in the query results, but typically, you would present the user with a form.

  7. #7
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37
    hye jzwp11,

    thankz for your explanation. For run query part i think it's ok now but i didn't get how to make user can edit using form..
    is it after user search in form, then i need to create button to open form..??

    i did'nt get it actually..
    huhu..

  8. #8
    chuki2 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    Selangor,Malaysia
    Posts
    26
    I see.. it easy....

    You can put listbox to show a result.. then you create button to popup a form for edited..

    On the form edited, data source must in query and put criteria..

    So in the criteria, write "Like forms!formSearch!listBox" in field ID..

  9. #9
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37
    hye chuki2,

    can u give me some example for that in acdb..

    thankz in advanced

  10. #10
    nurul is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    37
    and i more things, do you know the code that i should fill in query criteria for text box..
    i have the code but the code will make some of my data missing..
    dunno why it happen..
    is't this code correct??

    like "*" & [forms].[formSearch].[qdescription1] & "*"

  11. #11
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    In the attached example database there are two search forms that illustrate the two techniques. The first form frmSearchAndShowQueryResults runs the query when the button is clicked and shows the query results directly. The second form frmSearchAndShowResultsInAForm opens another form based on the table and filters the results as the form is opened.
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 12
    Last Post: 06-08-2012, 02:37 AM
  2. Replies: 12
    Last Post: 03-22-2012, 02:48 AM
  3. How to make Search forms
    By Spark in forum Forms
    Replies: 7
    Last Post: 09-12-2011, 05:37 AM
  4. Control can't be edited
    By TracyBell in forum Database Design
    Replies: 11
    Last Post: 05-17-2011, 01:38 PM
  5. Adding 'Last Edited' Date
    By vCallNSPF in forum Forms
    Replies: 2
    Last Post: 12-16-2009, 04:36 PM

Tags for this Thread

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