display just the first element in a field on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a .csv file that I import. The first 8 lines have important
information such as date, test parameters, etc. (1 parameter per line) The
remaining lines consist of 4 parameters per line separated by a comma; easily
read into Access. How can I display just the first element of "field1" on a
form? I do not wish to change this value. I have tried a Text Box with the
Control Source =[Imported_Table]![Field1].[column](1) only to get a
#name? What is the simplest way to accomplish this? Thank you!!!
 
I have a .csv file that I import. The first 8 lines have important
information such as date, test parameters, etc. (1 parameter per line) The
remaining lines consist of 4 parameters per line separated by a comma; easily
read into Access. How can I display just the first element of "field1" on a
form? I do not wish to change this value. I have tried a Text Box with the
Control Source =[Imported_Table]![Field1].[column](1) only to get a
#name? What is the simplest way to accomplish this? Thank you!!!

Just a simple example of what you imported and what you wish to
display on the form would have made this much easier.
What does 'first element' mean in Access?
What is [Field1].[column](1) ?
In Access, that's how you would display the 2nd column value of a
Combo Box, yet you are trying to place a value in a text control.

As it is, I'll guess you want:

=DLookUp("[Field1]","[Imported Table]")

If it is the 2nd column of a combo box, then use
=[ComboName].Column(1)
 
I guess I don't have a handle yet on when to use a Text Box and when to use
something else.
The input data:
Field1 Field2 Field3 Field4 Field5
..070
Version: 2
Sampling Interval: 0.1
Sampling Rate: 10
Sample Count: 87
Device Serial Number: 0
Culture Info: en-US
Sample Number Data/Time TRAVEL FORCE ELONGATION
1 11/08/2007 09:58:44.843 AM 0.0012 0.0610 -0.0009
2 11/08/2007 09:58:44.943 AM 0.0012 0.0610 -0.0009
3 11/08/2007 09:58:45.043 AM 0.0012 0.0610 -0.0043
4 11/08/2007 09:58:45.143 AM 0.0012 0.0610 -0.0043
5 11/08/2007 09:58:45.243 AM 0.0012 0.0610 -0.0009
6 11/08/2007 09:58:45.343 AM 0.0012 0.0366 -0.0009
7 11/08/2007 09:58:45.443 AM 0.0012 0.0366 -0.0009
8 11/08/2007 09:58:45.543 AM -0.0012 0.0610 -0.0043
9 11/08/2007 09:58:45.643 AM -0.0012 0.0610 -0.0061
10 11/08/2007 09:58:45.743 AM -0.0012 0.0610 -0.0043

As you can see, the top 8 lines are descriptive; some parameters are useful
and I want to use them in Access. The first value is a thickness measurement
that is used in calculations and for display purposes.
Using another posting as an example, I used the Text Box and in the control
source, I used Control Source =[Imported_Table]![Field1].[column](0) to pull
the value .070 from the imported table.
Bottom line, I need to capture the value .070 and display it in a form and
use it in calculations. Knowing a bit more about the application, what would
you suggest. Thank you again.

fredg said:
I have a .csv file that I import. The first 8 lines have important
information such as date, test parameters, etc. (1 parameter per line) The
remaining lines consist of 4 parameters per line separated by a comma; easily
read into Access. How can I display just the first element of "field1" on a
form? I do not wish to change this value. I have tried a Text Box with the
Control Source =[Imported_Table]![Field1].[column](1) only to get a
#name? What is the simplest way to accomplish this? Thank you!!!

Just a simple example of what you imported and what you wish to
display on the form would have made this much easier.
What does 'first element' mean in Access?
What is [Field1].[column](1) ?
In Access, that's how you would display the 2nd column value of a
Combo Box, yet you are trying to place a value in a text control.

As it is, I'll guess you want:

=DLookUp("[Field1]","[Imported Table]")

If it is the 2nd column of a combo box, then use
=[ComboName].Column(1)
 
Back
Top