Solved

Access 2010: Use a field as a calculated field but allow users to write over the value

Posted on 2014-03-04
4
461 Views
Last Modified: 2014-03-08
I have an access database which we are using for planning purposes.  We are back dating the project from the delivery date using estimated hours for the work.  This then calculates the complete dates for each of the tasks.

Once the planning dates are sent, we would like to allow the user to be able to go to the field and write over the date in the field and change it to a new planning date.

Is this possible?

Example:
1. Planned Delivery Date = Date entered by user
2. Inspection Comp Date = Planned Delivery date - Packaging Hours Est
3. Assembly Comp Date = Inspection Comp Date - Inspection Hours Est
etc.

What if I then want to allow the user to go into the app and change the inspection complete date without changing the other dates that come before the inspection date?
0
Comment
Question by:btgtech
  • 3
4 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39904117
A textbox based on a calculated field/value will not be updateable, so instead you should based the textbox on the underlying field and then use VBA To write those values if they're blank. For example:

Sub Form_Current()

If Nz(Me.InspComplDate,0) = 0 Then
  Me.InspComplDate =  Dateadd("h", Me.PkgHrsEst, Me.PlannedDelDate)
End If

End Sub

You'd do much the same fo the Assembly Compl Date
0
 

Author Comment

by:btgtech
ID: 39910351
Or - would it make sense to capture data in a "planning table" so that the user can continue to play with the dates and hours.  Once they are ready to accept the plan, then write the values to the working schedule table.  Then they can update the values as needed in the working table.

Thoughts?
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39910463
You certainly could - or you could provide them a "scratchpad" sort of form, where they could plug in numbers and dates, and decide whether they wanted to save or not.
0
 
LVL 84
ID: 39914677
Any reason for the B grade? You asked if you could update a field based on a calculation and my comment informed you that you could not do so, and gave you a workaround for it.

You then asked a question about using a staging table or form, and I provided you input on that.

So why the B?
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now