473,386 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Units Conversion in Data Entry Field on a Form

Hello,

Have yet another problem on a form that has me stumped. In a table that I
am working with, the values for one of the fields are stored in meters.
However the values that are supplied for data entry are in feet. Therefore,
I don't believe that I can use a bound text box to support the entry of data
for this field. I could use an expression to compute the value for display
in the text box as follows:

[TOTAL_DEPTH]*100/(12*2.54)

But then the text box would represent a calculated field, and become
non-editable, right? The user needs to be able to enter values in this
field, and have them converted back from feet to meters prior to storage in
the corresponding database field. How can this be accomplished?

Thanks again,
s/KAM

Nov 13 '05 #1
2 3017
Kevin Myers wrote:
Hello,

Have yet another problem on a form that has me stumped. In a table that I
am working with, the values for one of the fields are stored in meters.
However the values that are supplied for data entry are in feet. Therefore,
I don't believe that I can use a bound text box to support the entry of data
for this field. I could use an expression to compute the value for display
in the text box as follows:

[TOTAL_DEPTH]*100/(12*2.54)

But then the text box would represent a calculated field, and become
non-editable, right? The user needs to be able to enter values in this
field, and have them converted back from feet to meters prior to storage in
the corresponding database field. How can this be accomplished?

Thanks again,
s/KAM

I have solved this issue before. Have an unbound textbox for entering in
the Feet/inches, make the metric textbox hidden and add code to the
afterupdate event of the Imperial text box.

You will also need to convert the Metric into Imperial to display the
current database value in the text box.

sub txt_feet_afterupdate()

if isnull(me!txt_feet) then
me!txt_metric=Null
elseif not isnumeric(me!txt_feet)
msgbox "You must enter a valid number",vbokonly,"Data Input"
me!txt_feet=Null
me!txt_feet.setfocus
else
me!txt_metric=me!txt_feet*100/(12*2.54)
endif

end sub

Check the code, I have not written anything in Acces for some time.

Gavin
Nov 13 '05 #2
"Kevin Myers" <Ke********@austin.rr.com> wrote in message
news:10*************@corp.supernews.com...
Hello,

Have yet another problem on a form that has me stumped. In a table that I
am working with, the values for one of the fields are stored in meters.
However the values that are supplied for data entry are in feet. Therefore, I don't believe that I can use a bound text box to support the entry of data for this field. I could use an expression to compute the value for display in the text box as follows:

[TOTAL_DEPTH]*100/(12*2.54)

But then the text box would represent a calculated field, and become
non-editable, right? The user needs to be able to enter values in this
field, and have them converted back from feet to meters prior to storage in the corresponding database field. How can this be accomplished?

If it's an option to do so, change the table structure to hold the raw data
in feet. The convert the output to meters whenever you need to. Storing
calculated information is generally not a good idea.
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Don Seckler | last post by:
I am trying to set up a PHP web page so I can enter data into a database. I created a form: <form action="admin_news_insert_processor.php" method="post" name="frm_Insert_News"...
5
by: Carlos Ribeiro | last post by:
Hello all, I'm posting this to the list with the intention to form a group of people interested in this type of solution. I'm not going to spam the list with it, unless for occasional and...
2
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
26
by: David W. Fenton | last post by:
A client is panicking about their large Access application, which has been running smoothly with 100s of thousands of records for quite some time. They have a big project in the next year that will...
2
by: JC Mugs | last post by:
I have a form that when you tab from field to field that the entry point is blank, but if you point and click in the field it brings up a 0 and data entry is started to the left of the zero. ...
2
by: x | last post by:
hi i am a pilot by profession. i want to create a database of my logbook using ms access 2002. i am facing a problem regarding the format of time field. when i select "Data/Time" data type for my...
4
by: beatdream | last post by:
I am designing a database to handle different kinds of products ... and these products can have different properties...for example, a trouser can be specified by the width, length, color, and other...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
0
by: dataentryoffshore | last post by:
Get a Discount up to 60% on data entry, data capture, dataentry services, large volume data processing and data conversion services through offshore facilities in India. Offshore data entry also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.