I have a recordset pulling 50 columns from a 100 column table for one record; i want to pull all fields from the recordset if not null and append the column header to the value as well; I am having issues looping through; Any help is greatly appreciated!
Sample UNTESTED CODE - Just a thought; not sure if it will work
mysql = "SELECT tblmeta.metaIndividual,tblmeta.metaCompany, 48 more fields,
FROM TblBEPull INNER JOIN" _ where PaymentID =" & Me.lst_outgoing & ""
Set rst = CurrentDb.OpenRecordset(mysql, dbOpenDynaset)
Do While rst.EOF
for rst(0) to rst(50)
If rst.fields.value <> "" Then
myheader = rst.Fields.Name
myvalue = rst.fields.vaue
mystring = myheader & "," myvalue
'End If
'Loop
Not sure if I need the rst.eof since I am only analyzing one record. Thanks in advance
Sample UNTESTED CODE - Just a thought; not sure if it will work
mysql = "SELECT tblmeta.metaIndividual,tblmeta.metaCompany, 48 more fields,
FROM TblBEPull INNER JOIN" _ where PaymentID =" & Me.lst_outgoing & ""
Set rst = CurrentDb.OpenRecordset(mysql, dbOpenDynaset)
Do While rst.EOF
for rst(0) to rst(50)
If rst.fields.value <> "" Then
myheader = rst.Fields.Name
myvalue = rst.fields.vaue
mystring = myheader & "," myvalue
'End If
'Loop
Not sure if I need the rst.eof since I am only analyzing one record. Thanks in advance