• Use Current Record for Query (Access 2000 SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Use Current Record for Query (Access 2000 SR2)

    Author
    Topic
    #378497

    I’ll describe the problem and there may be two ways to do this. But I’m still interested i using current record for queries.

    FORM-A

    Customer Number:
    Account Number
    Cost center Number:
    Checkbox: Done

    I want to check the box to signify that this record is finished so that the next time I open the form this record will not show up.

    Problem. Since the Form is based on multiple queries, I get the error” This recordset cannot be updated:

    Solution?
    A Command button that:
    Captures the Customer Number, Account Number, Cost center Number, and places it in an update query that runs in the background. The Update query will find all the records matching these 3 criterias and mark them ‘done’.

    (I’ll eventually need this for a “Print Current Record” button to be designed later. I have done this in the past and will research it, but any speedier help will be most appreciated!

    OR-

    Another suggestion…..

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #626818

      A query can access data from the current record in a form using the syntax:
      forms![formname]![controlname]
      So in your case this forms![form-A]![Customer Number]
      etc

      You can use the expression builder to build expressions like this. (it avoids typing and syntax errors)
      have the form open in the back, then in the criteria line of the query, in the relevant field, right click and choose build.
      Double Click the + next to forms, then again next to Open forms. Your form will be listed. Click it, and all the controls will be listed in the centre panel. double click the control you want and the expression you want will be displayed at the top. If it is Ok, click OK. If not, edit or delete and start again.

    Viewing 0 reply threads
    Reply To: Use Current Record for Query (Access 2000 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: