If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Adding a field to a recordset or a better suggestion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-18-11, 16:14
daprogra daprogra is offline
Registered User
 
Join Date: May 2011
Location: Tucson, Arizona
Posts: 2
Red face 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 16:47. Reason: Add some specifics
Reply With Quote
  #2 (permalink)  
Old 05-19-11, 06:38
apr pillai apr pillai is offline
Registered User
 
Join Date: Jan 2009
Location: Kerala, India
Posts: 107
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.
__________________
http://www.msaccesstips.com (Learn MS-Access Tips & Tricks)
Learn Advanced MS-Access Programming with sample VBA Code.
Reply With Quote
  #3 (permalink)  
Old 05-19-11, 11:44
daprogra daprogra is offline
Registered User
 
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.
Reply With Quote
Reply

Tags
add, column, dao, field, recordset

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On