Results 1 to 3 of 3
  1. #1
    Join Date
    May 2011
    Location
    Tucson, Arizona
    Posts
    2

    Red face Unanswered: Adding a field to a recordset or a better suggestion

    Hello - this is my first post so please be gentle.

    I am working on a vehicle maintenance database in Access 2007.

    I want to pull up a listing of the maintenance items that are required for a specific vehicle and then be able to choose which items need to be done. Once the specific items to be performed are selected then you click a button to print a listing of work to be performed to give to the contractor performing the work.

    I created a form that accepts the vehicle Id, the present mileage and the date. I click a button and then my listing comes up in a form.

    I created a query that works that gives me the title of the activity, the way that activity is tracked (date,mileage, indicator light), the next time that activity is due, the difference between the present status and the due status(date, Mile, etc). This is loaded into an existing form that lists the individual records and the data input in the header of the form.

    What I was trying to do is add a binary field in the query called Selected, default it to false and then link it to a check box on my form. All this works up to here, it is just that when I try to click the selected checkbox in the form, it reports that the field is an expression and can not be changed.

    So the question is, is there a way to do this along the lines that I am doing this or is there a better way.

    This was done with DAO.
    Last edited by daprogra; 05-18-11 at 17:47. Reason: Add some specifics

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183

    Adding a field to a recordset or a better suggestion

    You have added an extra column to the Query with an expression and set the default value with a constant. This value is not getting stored anywhere. Hence it cannot be altered on the form either.

    You must consider adding a field to the base table where you can store the changes that you make on the form.
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    May 2011
    Location
    Tucson, Arizona
    Posts
    2

    Will set that up

    Thanks for the reply.

    I was considering this. The selected field is only valid while the form is open.

    I was hoping there was a way to do this in the recordset.

    Thanks again.

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
  •