G
Guest
Hi all,
I have the following code statements to print my results in the "Immediate"
box:
////////// - Code Statements-/////////////////
'Loop Through and Display The Field Names
Msg = " "
For i = 0 To rs.Fields.Count - 1
Msg = Msg & "|" & rs.Fields(i).Name
Next
MsgBox Msg
'Loop Through and Display The Field Values for Each Record
Msg = " "
Debug.Print rs.Fields(0).Name; rs.Fields(6).Name; rs.Fields(7).Name;
rs.Fields(8).Name; rs.Fields(9).Name
rs.MoveFirst
Do While (Not rs.EOF)
If rs.Fields(0).Value = "676 NICH(BASEMENT)" Then
Debug.Print rs.Fields(0).Value, rs.Fields(6).Value, rs.Fields(7).Value,
rs.Fields(8).Value, rs.Fields(9).Value
End If
rs.MoveNext
Loop
MsgBox ("Connection was successful.")
////////////The Results in the "Immediate"
Box//////////////////////////////////
ClientSampleIDAnalyteNameResultResultUnitsLabQualifier
676 NICH(BASEMENT) Trichloroethene 1.1 ug/m3
Null
ClientSampleID AnalyteName Result
ResultUnits ClientSampleIDAnalyteNameResultResultUnitsLabQualifier
676 NICH(BASEMENT) Dichlorodifluoromethane 2.6 ug/m3
Null
676 NICH(BASEMENT) Chloromethane 1.6 ug/m3 Null
676 NICH(BASEMENT) Vinyl chloride 0.51 ug/m3
U
676 NICH(BASEMENT) Bromomethane 0.78 ug/m3 U
676 NICH(BASEMENT) Chloroethane 0.53 ug/m3 U
**************************************
1) In the first line of the Results, all the Fields Names are printed
togather. How can I put some variable spacing between two FieldsNames?
2) In the Results (from the second line on), some Value numbers are so close
the chemical names. How can I control the column width for each column in
order to print each column to line uo from the Top to the Bottom of each
column?
Please help and advise.
Thanks in advance,
SHC
I have the following code statements to print my results in the "Immediate"
box:
////////// - Code Statements-/////////////////
'Loop Through and Display The Field Names
Msg = " "
For i = 0 To rs.Fields.Count - 1
Msg = Msg & "|" & rs.Fields(i).Name
Next
MsgBox Msg
'Loop Through and Display The Field Values for Each Record
Msg = " "
Debug.Print rs.Fields(0).Name; rs.Fields(6).Name; rs.Fields(7).Name;
rs.Fields(8).Name; rs.Fields(9).Name
rs.MoveFirst
Do While (Not rs.EOF)
If rs.Fields(0).Value = "676 NICH(BASEMENT)" Then
Debug.Print rs.Fields(0).Value, rs.Fields(6).Value, rs.Fields(7).Value,
rs.Fields(8).Value, rs.Fields(9).Value
End If
rs.MoveNext
Loop
MsgBox ("Connection was successful.")
////////////The Results in the "Immediate"
Box//////////////////////////////////
ClientSampleIDAnalyteNameResultResultUnitsLabQualifier
676 NICH(BASEMENT) Trichloroethene 1.1 ug/m3
Null
ClientSampleID AnalyteName Result
ResultUnits ClientSampleIDAnalyteNameResultResultUnitsLabQualifier
676 NICH(BASEMENT) Dichlorodifluoromethane 2.6 ug/m3
Null
676 NICH(BASEMENT) Chloromethane 1.6 ug/m3 Null
676 NICH(BASEMENT) Vinyl chloride 0.51 ug/m3
U
676 NICH(BASEMENT) Bromomethane 0.78 ug/m3 U
676 NICH(BASEMENT) Chloroethane 0.53 ug/m3 U
**************************************
1) In the first line of the Results, all the Fields Names are printed
togather. How can I put some variable spacing between two FieldsNames?
2) In the Results (from the second line on), some Value numbers are so close
the chemical names. How can I control the column width for each column in
order to print each column to line uo from the Top to the Bottom of each
column?
Please help and advise.
Thanks in advance,
SHC