G
Gina
Hi.
Is there a generic syntax to find out how many columns or fields a record
has ??
I would like to have a small generic function just taking the tablename as
an argument instead of having to do the fileds stuff for each single table
here's what I've got
___
Set rs = db.OpenRecordset("SELECT * FROM " & strTablename)
Open CurrentProject.Path & "\" & strTablename & ".txt" For Output As #1
'.... here I do not know the syntax for the number of fields and how to go
on
Do While Not rs.EOF
mat = rs("Material") & "|"
If Not IsNull(rs("Use")) Then
use= rs("Use") & "|"
Else
use= "" & "|"
End If
If Not IsNull(rs("Price")) Then
price= rs("Price")
Else
price= 0
End If
Line = mat & use & price
Print #1, Line
rs.MoveNext
Loop
___
any help most appreciated, thanks in advance !
Gina
Is there a generic syntax to find out how many columns or fields a record
has ??
I would like to have a small generic function just taking the tablename as
an argument instead of having to do the fileds stuff for each single table
here's what I've got
___
Set rs = db.OpenRecordset("SELECT * FROM " & strTablename)
Open CurrentProject.Path & "\" & strTablename & ".txt" For Output As #1
'.... here I do not know the syntax for the number of fields and how to go
on
Do While Not rs.EOF
mat = rs("Material") & "|"
If Not IsNull(rs("Use")) Then
use= rs("Use") & "|"
Else
use= "" & "|"
End If
If Not IsNull(rs("Price")) Then
price= rs("Price")
Else
price= 0
End If
Line = mat & use & price
Print #1, Line
rs.MoveNext
Loop
___
any help most appreciated, thanks in advance !
Gina