A Microsoft Office (Excel, Word) forum. OfficeFrustration

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   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

default value ?



 
 
Thread Tools Display Modes
  #1  
Old April 13th, 2005, 10:12 AM
mikey
external usenet poster
 
Posts: n/a
Default 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  
Old April 13th, 2005, 12:44 PM
BruceM
external usenet poster
 
Posts: n/a
Default

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  
Old April 13th, 2005, 01:41 PM
mikey
external usenet poster
 
Posts: n/a
Default

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  
Old April 13th, 2005, 04:05 PM
BruceM
external usenet poster
 
Posts: n/a
Default

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  
Old April 13th, 2005, 04:25 PM
mikey
external usenet poster
 
Posts: n/a
Default



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

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 03:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.