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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Override default value sourced via Dlookup?
I have a Quotes table and form, and a Costing form which is based on the
CostsActual table. On the Costing form I want the various components of our costs to display the quoted amounts by default, but if these have actually come out different once we have done the job then the user needs to be able to override the figures and enter the actual costs. The source of each Cost control is the relevant field in the CostsActual table. In the Default Value properties of these controls I have used DLookup to pull the quoted costs from the Quotes table and that's fine. However, although they show as Enabled Yes and Locked No, we cannot overwrite the displayed amounts. Am I asking too much, to be able to show a value pulled from one source by default, but then overwrite it with another value that is input by the user and which writes to a different table (albeit the table which is the source for the form)? Thanks for any suggestions! CW |
#2
|
|||
|
|||
Override default value sourced via Dlookup?
A Default Value can be overwritten by manually entering new data, so you
shouldn't be having a problem. On the other hand, setting the Control Source to something, like a value retrieved using DLookup(), cannot be overwritten. First thing I'd do is look at the Control Source and make sure you didn't place something there during the development process and forget to remove it. Is the form updatable, i.e. can you enter and save other data? Other than that, based on the facts you've given, I'd have to lean towards corruption of some sort. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200804/1 |
#3
|
|||
|
|||
Override default value sourced via Dlookup?
Many thanks for your prompt reply...yes I do have the Control Sources set,
they point to the relevant fields in the CostsActual table. That's cos the way I want it to work, users will initially (by default) see the quoted amounts which are being pulled from the Quotes table. But if the actual amounts have come in different, they need to input those and have them stored in the CostsActual table. In this way, we can work out variances between amounts allowed for within our quotes (stored in the Quotes table and not overwritten) and the actual cost amounts (newly stored in the CostsActual table). Hope this clarifies what I'm trying to do, and why. The question now is, HOW ?! Thanks again CW "Linq Adams via AccessMonster.com" wrote: A Default Value can be overwritten by manually entering new data, so you shouldn't be having a problem. On the other hand, setting the Control Source to something, like a value retrieved using DLookup(), cannot be overwritten. First thing I'd do is look at the Control Source and make sure you didn't place something there during the development process and forget to remove it. Is the form updatable, i.e. can you enter and save other data? Other than that, based on the facts you've given, I'd have to lean towards corruption of some sort. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200804/1 |
#4
|
|||
|
|||
Override default value sourced via Dlookup?
=?Utf-8?B?Q1c=?= wrote in
: Many thanks for your prompt reply...yes I do have the Control Sources set, they point to the relevant fields in the CostsActual table. That's cos the way I want it to work, users will initially (by default) see the quoted amounts which are being pulled from the Quotes table. But if the actual amounts have come in different, they need to input those and have them stored in the CostsActual table. In this way, we can work out variances between amounts allowed for within our quotes (stored in the Quotes table and not overwritten) and the actual cost amounts (newly stored in the CostsActual table). Hope this clarifies what I'm trying to do, and why. The question now is, HOW ?! Thanks again CW Are other fields in the form editable? The form itself can be locked, by setting the allow_edits property to No. Are you perhaps using a query to reference the table to the form. Some queries are read only, If it's a query, can you edit the data directly in the query? "Linq Adams via AccessMonster.com" wrote: A Default Value can be overwritten by manually entering new data, so you shouldn't be having a problem. On the other hand, setting the Control Source to something, like a value retrieved using DLookup(), cannot be overwritten. First thing I'd do is look at the Control Source and make sure you didn't place something there during the development process and forget to remove it. Is the form updatable, i.e. can you enter and save other data? Other than that, based on the facts you've given, I'd have to lean towards corruption of some sort. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access- forms/200804/1 -- Bob Quintal PA is y I've altered my email address. ** Posted from http://www.teranews.com ** |
#5
|
|||
|
|||
Override default value sourced via Dlookup?
Sorry, but you're not paying attention!!!.My first post told you how!
If you have the ***Default Value*** set using the DLookup() on your table, you ***can*** later change the value! If you have the ***Control Source*** set using the DLookup() on your table, you ***cannot*** later change the value! So move your DLookup() from the Control Source to the Default Value, and you should be set! -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
#6
|
|||
|
|||
Override default value sourced via Dlookup?
OK thanks, I'm clear about what you're saying.
What I have is a combination of both. On each of the Cost controls the Default Value is set to a DLookup in the Quotes table, and at the same time the Control Source is set to a field in the CostsActual table. The source for the form is that table itself, it's not via a query. So, should it be feasible for us to overwrite the displayed default value and write the desired new amount to the CostsActual table? It's not possible as it stands now. Thanks CW "Linq Adams via AccessMonster.com" wrote: Sorry, but you're not paying attention!!!.My first post told you how! If you have the ***Default Value*** set using the DLookup() on your table, you ***can*** later change the value! If you have the ***Control Source*** set using the DLookup() on your table, you ***cannot*** later change the value! So move your DLookup() from the Control Source to the Default Value, and you should be set! -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
#7
|
|||
|
|||
Override default value sourced via Dlookup?
Bob, thanks for your suggestions...yes, all other controls on the form are
editable, it's just those that have their Default Value set to DLookup that are giving the trouble. And yes, the Allow Edits property is set to Yes. And no, I'm not using a query as the source for the form, it's based directly upon the CostsActual table. I wonder if you have any further thoughts...? Many thanks CW "Bob Quintal" wrote: =?Utf-8?B?Q1c=?= wrote in : Many thanks for your prompt reply...yes I do have the Control Sources set, they point to the relevant fields in the CostsActual table. That's cos the way I want it to work, users will initially (by default) see the quoted amounts which are being pulled from the Quotes table. But if the actual amounts have come in different, they need to input those and have them stored in the CostsActual table. In this way, we can work out variances between amounts allowed for within our quotes (stored in the Quotes table and not overwritten) and the actual cost amounts (newly stored in the CostsActual table). Hope this clarifies what I'm trying to do, and why. The question now is, HOW ?! Thanks again CW Are other fields in the form editable? The form itself can be locked, by setting the allow_edits property to No. Are you perhaps using a query to reference the table to the form. Some queries are read only, If it's a query, can you edit the data directly in the query? "Linq Adams via AccessMonster.com" wrote: A Default Value can be overwritten by manually entering new data, so you shouldn't be having a problem. On the other hand, setting the Control Source to something, like a value retrieved using DLookup(), cannot be overwritten. First thing I'd do is look at the Control Source and make sure you didn't place something there during the development process and forget to remove it. Is the form updatable, i.e. can you enter and save other data? Other than that, based on the facts you've given, I'd have to lean towards corruption of some sort. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access- forms/200804/1 -- Bob Quintal PA is y I've altered my email address. ** Posted from http://www.teranews.com ** |
#8
|
|||
|
|||
Override default value sourced via Dlookup?
=?Utf-8?B?Q1c=?= wrote in
: Bob, thanks for your suggestions...yes, all other controls on the form are editable, it's just those that have their Default Value set to DLookup that are giving the trouble. And yes, the Allow Edits property is set to Yes. And no, I'm not using a query as the source for the form, it's based directly upon the CostsActual table. I wonder if you have any further thoughts...? Many thanks CW First, test to see if removing the default value lets you edit those controls. If removal allows editing, try a static value in the default value. if it is the dlookup causing the problem a workaround is to set the values using some code in thte before insert event of the form. "Bob Quintal" wrote: =?Utf-8?B?Q1c=?= wrote in : Many thanks for your prompt reply...yes I do have the Control Sources set, they point to the relevant fields in the CostsActual table. That's cos the way I want it to work, users will initially (by default) see the quoted amounts which are being pulled from the Quotes table. But if the actual amounts have come in different, they need to input those and have them stored in the CostsActual table. In this way, we can work out variances between amounts allowed for within our quotes (stored in the Quotes table and not overwritten) and the actual cost amounts (newly stored in the CostsActual table). Hope this clarifies what I'm trying to do, and why. The question now is, HOW ?! Thanks again CW Are other fields in the form editable? The form itself can be locked, by setting the allow_edits property to No. Are you perhaps using a query to reference the table to the form. Some queries are read only, If it's a query, can you edit the data directly in the query? "Linq Adams via AccessMonster.com" wrote: A Default Value can be overwritten by manually entering new data, so you shouldn't be having a problem. On the other hand, setting the Control Source to something, like a value retrieved using DLookup(), cannot be overwritten. First thing I'd do is look at the Control Source and make sure you didn't place something there during the development process and forget to remove it. Is the form updatable, i.e. can you enter and save other data? Other than that, based on the facts you've given, I'd have to lean towards corruption of some sort. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access- forms/200804/1 -- Bob Quintal PA is y I've altered my email address. ** Posted from http://www.teranews.com ** -- Bob Quintal PA is y I've altered my email address. ** Posted from http://www.teranews.com ** |
Thread Tools | |
Display Modes | |
|
|