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
|
|||
|
|||
default value ?
Hi
I have a form on which one field is a metric. there is a later field with the imperial equivalent - how can i get it to default to this ? Mike |
#2
|
|||
|
|||
One way is to have this as the After Update event for the MetricValue
control:[ImperialValue] = [MetricValue] * Conversion Factor "mikey" wrote: Hi I have a form on which one field is a metric. there is a later field with the imperial equivalent - how can i get it to default to this ? Mike |
#3
|
|||
|
|||
I've tried
[Distance (imp)] =[Distance (metric)]*0.6213712 in the default value, beforeupdate and afterupdate events, and it doesn't seem to make any difference - the value 0 is always displayed and updated to the table ? What could I be doing wrong ? Mike "BruceM" wrote in message ... One way is to have this as the After Update event for the MetricValue control:[ImperialValue] = [MetricValue] * Conversion Factor "mikey" wrote: Hi I have a form on which one field is a metric. there is a later field with the imperial equivalent - how can i get it to default to this ? Mike |
#4
|
|||
|
|||
I don't know if it makes any difference, but I would avoid the use of
parentheses in field names. If Distance(imp) is the field name I would go with something like DistanceImp instead. I would name the text box bound to that field txtDistanceImp. There is no reason to store a calculated value. You can calculate on the fly in a query, or in a control on a form or report. If you bind the metric value to a field in your table, the imperial value text box will be unbound. If you will always be entering the metric value all you need to do is to set the Control Source of the imperial value text box to =[txtDistanceMet] * conversion factor. If you will be entering initial values in either text box then you will need to handle assigning a value to the unbound text with On Current code (although you could run the code elsewhere), and using the After Update event of the unbound text box to assign a value to the bound field's text box. Or something like that, which could vary depending on details. "mikey" wrote: I've tried [Distance (imp)] =[Distance (metric)]*0.6213712 in the default value, beforeupdate and afterupdate events, and it doesn't seem to make any difference - the value 0 is always displayed and updated to the table ? What could I be doing wrong ? Mike "BruceM" wrote in message ... One way is to have this as the After Update event for the MetricValue control:[ImperialValue] = [MetricValue] * Conversion Factor "mikey" wrote: Hi I have a form on which one field is a metric. there is a later field with the imperial equivalent - how can i get it to default to this ? Mike |
#5
|
|||
|
|||
There is no reason to store a calculated value. You can calculate on the fly in a query, or in a control on a form or report. That is very true..... |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with default pop3 account in Outlook 2003 | tstrawbridge | General Discussion | 4 | February 9th, 2005 02:22 AM |
Making outlook default email client | Lachie Findlater | Outlook Express | 1 | January 19th, 2005 01:00 PM |
Default font - possible bulletproof fix in Word 2003 | [email protected] | General Discussion | 0 | January 14th, 2005 09:14 PM |
Default Mail Client | PianoServant | Outlook Express | 6 | July 14th, 2004 05:01 AM |
Default Printer Problems | Ella | Setting Up & Running Reports | 1 | June 7th, 2004 12:01 AM |