Entering a value in a field and displaying converted value in anot

Hi.
I am designing a front end form for entering geological well data.  I have 
to enter depth measurements, but the information we acquire can be in feet or 
metres.  Although it is not difficult to manually calculate the conversions, 
I would like to enter the measurents into one of the fields and for the other 
field to be automatically filled with the converted value.
So if I enter a depth of 300 into the depth in feet field, the depth in 
metres field will take the value of 300, multiply it by 0.3048 and display 
the value of 91.44.
Likewise, if I enter a value in the metres field, the converted value will 
be displayed in the feet field.
I'm sure this can be done, but I'm not quite sure how?  Can anyone help 
please?
-- 
Thanks
Neil
0
Utf
10/26/2007 9:13:01 AM
access.forms 6864 articles. 2 followers. Follow

2 Replies
540 Views

Similar Articles

[PageSpeed] 13

One way would be to call a macro after update of the object.  The macro 
condition checks the other object for data and uses action of SetValue if it 
is empty.
So if there was data and you needed to change it you would first have to 
delete data in one and then change in the other.
-- 
KARL DEWEY
Build a little - Test a little


"wrobeln" wrote:

> Hi.
> I am designing a front end form for entering geological well data.  I have 
> to enter depth measurements, but the information we acquire can be in feet or 
> metres.  Although it is not difficult to manually calculate the conversions, 
> I would like to enter the measurents into one of the fields and for the other 
> field to be automatically filled with the converted value.
> So if I enter a depth of 300 into the depth in feet field, the depth in 
> metres field will take the value of 300, multiply it by 0.3048 and display 
> the value of 91.44.
> Likewise, if I enter a value in the metres field, the converted value will 
> be displayed in the feet field.
> I'm sure this can be done, but I'm not quite sure how?  Can anyone help 
> please?
> -- 
> Thanks
> Neil
0
Utf
10/26/2007 3:07:03 PM
I have done a very similar thing with volume in our system, allowing users to 
enter in either cubic feet (in one field) or cubic metres (in another field) 
and doing whichever conversion is required.

Taking your situation: in the AfterUpdate property of the DepthFeet control 
(field), create the following event procedure:

Private Sub DepthFeet_AfterUpdate()
Me.DepthMetres = Me.DepthFeet * 0.3048
End Sub

and you can do a similar thing in the DepthMetres field, switching the 
wording and the conversion factor around.

I'm usually asking questions here - it's nice to be able to give an answer 
for once!!
CW

"wrobeln" wrote:

> Hi.
> I am designing a front end form for entering geological well data.  I have 
> to enter depth measurements, but the information we acquire can be in feet or 
> metres.  Although it is not difficult to manually calculate the conversions, 
> I would like to enter the measurents into one of the fields and for the other 
> field to be automatically filled with the converted value.
> So if I enter a depth of 300 into the depth in feet field, the depth in 
> metres field will take the value of 300, multiply it by 0.3048 and display 
> the value of 91.44.
> Likewise, if I enter a value in the metres field, the converted value will 
> be displayed in the feet field.
> I'm sure this can be done, but I'm not quite sure how?  Can anyone help 
> please?
> -- 
> Thanks
> Neil
0
Utf
10/26/2007 4:41:00 PM
Reply:

Similar Artilces:

Category color changes when changing values.
When I copy a chart I get two identical ones. When I change the values of one of the charts and sort the values, Excel changes the colors of the categories to a preset order, so that the color of the biggest customer in chart 1 is not the same as this same customer (let's say now on the third place) in chart 2. Is there a way to prevent this? ...

Failure to Display anything but Methods in Microsoft.CRM.Proxy.dll
I'm using both VS.NET and VS.NET 2003 to attempt to run the "Find all the Incidents for an Account or Contact" code on MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crmsdk/htm /findallofthecasesassociatedwithanaccountorcontact.asp). I've added the reference to Microsoft.CRM.Proxy.dll and also have attempted to use the Microsoft.CRM.ComProxy.dll when the first failed. I am unable to compile as the C# compiler states that both ".Credentials" and ".Url" are not valid properties of the Microsoft.CRM.Proxy.BizUser class. I used the o...

How can I Enable a Check Box based on another fields value?
Hi There, I have a form with a disabled check box. I need to enable it when a certain value ("approved") is selected from a combo box. When I am in Form Design View and I have the Check Box selected the Conditional Formatting menu item on the Format menu is greyed out. I am using Access 2003. Can you tell me what I need to do to make this work? Many thanks, David As you've discovered, Conditional Formatting isn't availabe to checkboxes. Try this: Private Sub Form_Current() If Me.YourComboBox = "Approved" Then YourCheckBox.Enabled = True Else YourChe...

Newbie: can't get a calculated value on the form?
I have a table with numbers and a form that shows the numbers. I have a query that takes one of the numbers and mulitplies it. I put a text box on the form from the query result field, but I get a "#Name" error instead of the result. When I run the query, I get the correct result. Help, please? Ed "Ed from AZ" <prof_ofwhat@yahoo.com> wrote in message news:d1e7d27c-11d9-4696-8d19-4c5fdd9dbb89@d70g2000hsb.googlegroups.com... >I have a table with numbers and a form that shows the numbers. I have > a query that takes one of the numbers and mulitplies it. I p...

Is there a wizard to export and match fields?
I would like to export products from my table into a csv that has different field names. Is there a wizard that would allow me to select which fields to export and what fields they match up to in the new file? Instead of exporting a table, create a query and alias the field names to the ones you want in the CSV, then export the query. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L "ZenMasta" <me...

Field service table structure and field definitions
The 9 SDK does not reference or define the fields or tables for the Field service component. Where can I find this information? I need to move RMA into a data warehouse and am having significant trouble identifying the data flows. Thanks, Will You may want to contact I.B.I.S. They wrote the application. -- Charles Allen, MVP "WS" wrote: > The 9 SDK does not reference or define the fields or tables for the Field > service component. Where can I find this information? I need to move RMA > into a data warehouse and am having significant trouble identifying th...

Converting Values to Unicode Characters
The function CHAR converts a value in the range 1-255 to to an ANSI character. Is there a way to convert values in the range 1-65,342 to Unicode characters? -- Gary L. Smith gls432@yahoo.com Columbus, Ohio You can use VLOOKUP but you'll have to create your own lookup table of the unicode characters and I think you'll have to paste it onto the same spreadsheet.... Maybe you can find a lookup table on the internet somewhere that you can easily paste into your spreadsheet. tsides <tsides@intelligentsystemsconsulting.com> wrote: > You can use VLOOKUP but y...

Graph Data Values
I am trying to create a pick and mix graph that shows forecast spen against actual spend by a selected business area. I somehow want to create a graph on the fly based on the selections fo example: If I choose company one and want to see the contracted data I want th graph to pick up the forcasted contracted Labour, Passthru and Othe and show the combined contracted actuals; See attached; and if i then choose company 2 then graph will pick up the releven ranges? HELP!! Attachment filename: help.zip Download attachment: http://www.excelforum.com/attachmen...

How to enter the transaction
Hi, I am using Money 2001 standard edition. I wish to know how to enter a transaction where i have returned an item to the store and got back the cash or as a credit to my credit card account. The way I enter it now show it as my income which is not true. Can anyone help me with this. Thanks Damu --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.745 / Virus Database: 497 - Release Date: 08/27/2004 Enter a transaction with a category exactly the same as what you recorded against the purchase (ie record the credit on the ex...

Comments field
I would like to add some notes for a Payee but the Comments field under the Payee is not big enough. Is this the only place I can makes these type of notes? I want to put in information such as lenght of contract, type of service they provide, costs, etc.... Thank you. No other solutions (in Money) are coming to mind. "Apr" <noreply@mail.com> wrote in message news:u8WcsBuFHHA.3304@TK2MSFTNGP05.phx.gbl... > Is this the only place I can makes these type of notes? Apr wrote: > I would like to add some notes for a Payee but the Comments field > under the Pa...

How to add summary fields to Group Footer in Access Reports?
How do you add a Summary fields to Group Footers in Access? I have a Detail field I want to Sum in the Group Footer in my report. -- Pat Dools ...

Passing Values from One Form to Another Including a Combo Box
Hi, hope someone can help with passing two values from one form to another by way of a command button. I have spent a week on various code taken from this site, but still no luck. Please ... someone help!! The form I am passing values from is called PATIENT HISTORY-Form. On this form, I need to pass a date from a field called DateSFESigned and I also need to pass information collected from a Combo box, Combo91. The command button is called Command119. The form that the values are being passed to is called Personal Habits- Form. Thank you in advance for any help on this matter. Maurita ...

Pictures/Graphics won't display on website
Help, I'm new at this and have problem getting my website that I created in Publisher posted to web. The site will appear when I copy the index.htm file using my ISP file manager but not sure where the index_file folder and related graphics/pics need to be copied to. I tried creating a folder for index_file and copied all the files there that appear on my c drive when I published to the web. But all that displays are the alternate text for each pic/graphic. Any suggestions? A small child turns to Ed, and exclaims: "Look! Look! A post from anonymous@discussions.microsoft...

OUTLOOK FIELD NAME
Hi at all!!!I have this problem....I want export my mail from Lotus Notes into Microsoft Outlook 2000. I have the script already available but I don't know the field name of Outlook document. Something can help me??? Bye.... how in the heck did you get that far, i can't figure any of it out ----- giuliano wrote: ----- Hi at all!!!I have this problem....I want export my mail from Lotus Notes into Microsoft Outlook 2000. I have the script already available but I don't know the field name of Outlook document. Something can help me???...

Status field in POP10500
Can anyone tell me what "0" in the Status field of POP10500 means? I have shipments that show up on my Purchase Order Processing Document Inquiry window with no corresponding invoice. However, when I attempt to match them to a purchasing invoice, I get a message saying, “This line item has been fully received and invoiced, You may continue, or you may delete this line item and enter a different one.” Using Query Analyzer, I see records with a POTYPE of 2 (Invoiced Receipt) matching up to the shipments. However, the "Status" for these two records is "0". Th...

Moving fields on extender windows
Hi! Can someone tell me how I can move the fields on the extender windows? -- Marisol Mortera Because of the way Extender stores data, you cannot move fields like you would using Modifier. You need to go to the Extender windows design and set up another field with the information. Then you will need to move data behind the scenes from the existing field to the new field. Alternatively, you could export the data; delete the data in the window; and import it. "Marisol" wrote: > Hi! > > Can someone tell me how I can move the fields on the extender windows? > -- &...

ENTER button
Isn't there a way to make it so that if you're entering data and tabbing over several columns as you go, that after you hit ENTER the box moves down one row and to the first column that you began entering data into Thanks! Here is one I use that goes back to the original column and one row down. I use the right arrow key. right click sheet tab>view code>insert this>modify to suit. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Target.Row > 5 And Target.Column = 8 Then ActiveCell.Offset(1, -6).Select End Sub -- Don Guillett SalesAid Software donald...

Printing Custom Forms and Exporting Custom Fields
I want to design a custom form and place it in the Public Folder for use by multiple users. Two problems: 1) unable to print custom forms 2) understand that data from custom fields cannot be exported into another application I need to export the data for management reports. Any suggestions? I am not a programmer, but have had some success working with VBA in Excel. Info on the microsoft sites appears stale. We have Outlook 2002 and Microsoft XP operating system. Thank you very much. ...

###### when trying to enter a $ fugure
I am getting ##### but closer together in my worksheet when trying to enter a sales figure, i have chkd the format cells option with no joy, the rest of the worksheet is behaving except this column, Doh!! any suggestions??? Please Are you sure the cell is formatted as General (or some other number format) and not Date. The Date format makes #### a lot. If that doesn't work try using the format painter to copy the format from a column that is working to the column that isn't working. You may have to re-enter the values after you change the format however. Hope that helps. &q...

storing value in form field
Hello, I want to get values from a pop-up date form to insert in a text box on another form. Problem is when I close the date form, the value that the text box was referring to is gone. Is there a quick way to save the value in the main form until new dates are typed in? Thanks You should be able to hide the form rather than close it. "ryan" <ryan@discussions.microsoft.com> wrote in message news:49EA576C-544E-4A18-B4FB-4F7AF6D2951E@microsoft.com... > Hello, > > I want to get values from a pop-up date form to insert in a text box on > another form. Problem...

problem with mulit-column value list combo box
I am trying to read the values of 2 columns of the selected item in a multi-column combo box. cboField1 is the multi-column combo box cboField1.rowsource=3Dr1c1;r1c2;r2c1;r2c2;r3c1;r3c2..... cboField1 Row Source Type=3DValue List cboField1 Column Count=3D2 Me("cboField1").ItemData(2) gives me the value for column #1 in row #2 Me("cboField1").Column(1) gives me the value for column #2 in row #1 I can't find the syntax for getting the value for column #2 in row #2. Thanks for any help! THANKS! David G. On Tue, 24 Nov 2009 21:38:31 -0500, Dav...

Is it possible to measure/display the column width with a cell function?
Wednesday afternoon Is it possible to measure/display the column width with a cell function? I need to adjust some columns for a report. But I cannot find a way to display the current width in units that I can then place in a VBA macro. Would be very good to have the macro read the values entered in a set of columns and change the width accordingly. (This is very easy in Quattro pro.) J Have a look at ShowWidth at: http://www.sulprobil.com/html/get_cell.html HTH, Bernd -- Use non-volatile INDEX(P11:IV65536,1+w,1+y):INDEX(P11:IV65536,w+y,x+z) instead of volatile OFFSET(P11,w,x,y,z)...

Convert Lead to Account Button
Is there a way to disable the "Convert Leads to Account" button in the "Leads" form? We do not want to prevent the users from creating accounts we just do not want them to do it by converting a lead to an account. We would prefer they add Accounts in the Accounts section. -b ...

Typing single letter into Combobox brings entire field
I am using a combobox to look up a postcode When I type text into a combobox the first letter brings an entire suburb into the combobox. When I backspace over it behaves as I want it to behave. Each letter brings me closer. Is there an easy way to fix this? Avid Fan, Have a look at... http://allenbrowne.com/AppFindAsUType.html -- Gina Whipp 2010 Microsoft MVP (Access) "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Avid Fan" <me@privacy.net> wrote...

textbox value from a combobox in a continuous form
I have a combobox cboOperationID and textbox txtOperationDesc in a continuous form. User chooses an operationID in the combobox and textbox automatically displays the description of that operationID using Me.txtOperationDesc.Value = Me.cboOperationID.Column(1) in the afterupdate event of cboOperationID My problem is whenever i move to the next entry in my continuous form and chooses another operationID from the combobox, the description in the txtOperationDesc from the first entry also changes to that of the 2nd entry. -- Message posted via http://www.accessmonster.com There's a ...