Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-03-04
4
Medium Priority
?
493 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1500 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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1500 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 85
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

688 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