Mar 15 2009, 02:02 PM
I'm developing a database to import data from a remediation system that logs data (every second) on a usb flash drive. Some of the information that is logged includes, air flow rate, air temp, etc.
The problem is that for each variable (flow rate, temp, etc) the data consists of a string of digits.
Inlet Air Flow XXXX
Inlet Temp XXXX
Some where within these strings, a decimal needs to be placed. Luckily for me, I've been provided a "cheat" sheet that identifies the locations. Therefore, the above examples become:
Inlet Air Flow XXX.X
Inlet Temp XX.XX
I'd say that I'm an intermediate user to Access; but poor on programming. I fear that this may be a programming problem; although, there may be some built-in function that can deal with this that I'm not aware of.
Any help would be greatly appreciated.
Mar 15 2009, 02:42 PM
Simple concenation formulas should solve the problem. If you are capturing the data using a query you could create two calculated fields in the query.
In the first empty column of the query design enter this: AirFlow: cdbl(left([inlet air flow],3) & "." & right([inlet air flow],1)) In the next column's field row enter this Temp: cdbl(left([inlet temp],2) & "." & right([inlet temp]),2))
Be sure to replace [inlet temp] and [inlet air flow] with the names of the relevant fields in your data source. As I have written the expressions the results will be doubles. If the data type of the destination fields is not double you will have to use a c...() function that returns the correct data type.
Mar 15 2009, 07:58 PM
Thanks for the suggestion. I will try it out in the coming days.
Mar 16 2009, 03:44 AM
You are welcome.
Mar 21 2009, 09:29 AM
I've finally got around to this, works well. However, in datasheet view I have duplicate fields; the calculated ones and the originals. How do I drop the originals from showing and being passed on through other queries?
Mar 21 2009, 10:29 AM
In the query grid, there is a row of checkboxes called Show. Uncheck the boxes for the fields you do not want to display.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here