<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>Bericht</TITLE>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=669264512-18062003>Thank
you</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=nl dir=ltr align=left><FONT face=Tahoma
size=2>-----Oorspronkelijk bericht-----<BR><B>Van:</B> Arthur Fuller
[mailto:artful@rogers.com] <BR><B>Verzonden:</B> woensdag 18 juni 2003
12:58<BR><B>Aan:</B> accessd@databaseadvisors.com<BR><B>Onderwerp:</B> RE:
[AccessD] URGENT: Accessing DBF files from VBA with more than 255
Fields.<BR><BR></FONT></DIV>
<DIV><SPAN class=701425610-18062003><FONT face=Arial color=#0000ff size=2>This
little function won't do everything you want, but it should help considerably. A
little cutting and pasting and you're there:</FONT></SPAN></DIV>
<DIV><SPAN class=701425610-18062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=701425610-18062003><FONT face=Arial color=#0000ff
size=2><code></FONT></SPAN></DIV>
<DIV><SPAN class=701425610-18062003><FONT face=Arial color=#0000ff size=2>Public
Function FieldList(strSource As String, Optional intType As Integer,
_<BR> Optional bIncludePK As Boolean) As String<BR>'Returns a
comma-delimited list of the fieldnames from a table<BR>'Not including the first
field<BR>'On the assumption that this field is the Primary Key<BR>'TODO: refine
this assumption before publication, make it test against
PK<BR>'<BR> Dim rst As ADODB.Recordset<BR>
Dim fld As ADODB.Field<BR> Dim i As
Integer<BR> 'Dim cnn As Connection<BR> Dim
strList As String<BR> <BR> 'Set cnn =
CurrentProject.Connection<BR> Set rst = New
ADODB.Recordset<BR> <BR> rst.Open strSource,
CurrentProject.Connection<BR> For i = 0 To rst.Fields.Count -
1 'skip the first
field (PK usually)<BR> Set fld =
rst.Fields(i)<BR> With
fld<BR> If
Left$(.Name, 2) <> "s_" And Left$(.Name, 4) <> "MSys"
Then<BR>
Select Case
intType<BR>
Case
0<BR>
strList = strList & .Name & ",
"<BR>
Case
1<BR>
strList = strList & "[" & strSource & "].[" & .Name & "],
"<BR>
End Select<BR>
End If<BR> End
With<BR> Next<BR> FieldList = Left(strList,
Len(strList) - 2) 'drop the final ",
"<BR> rst.Close<BR> Set rst =
Nothing<BR> Set fld = Nothing<BR>End
Function</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=701425610-18062003></code></SPAN></FONT></DIV>
<DIV><SPAN class=701425610-18062003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV> </DIV>
<DIV> </DIV><!-- Converted from text/plain format -->
<P><FONT size=2>"Those who would sacrifice liberty for security deserve
neither."<BR>-- Benjamin Franklin </FONT></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Erwin
Craps<BR><B>Sent:</B> June 18, 2003 6:24 AM<BR><B>To:</B>
'accessd@databaseadvisors.com'<BR><B>Subject:</B> [AccessD] URGENT: Accessing
DBF files from VBA with more than 255 Fields.<BR><B>Importance:</B>
High<BR><BR></FONT></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2>Hi</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>I have linked DBF
files into my AXP, importing does not work, with more than 255
fields.</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>I need to cross
check two identical tables, for typo errors.</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>But I can acces
these tables from VBA (tried DAO and ADODB recordset) with a SELECT *
statement due to these +255 fields problem.</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>I could use
"SELECT Field1, Field2, Field3" etc but you understand this is some typ
work.</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>Is there an SQL
statement that I could use?</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>Something that
allows me to select fields 1 to 250 and afterwards fields
1,2,3,4,5, field 251 to last field.</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>Or do I really
need to typ in every fields name...</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial size=2>Or can numericly
refer to a field instead of using field names in my SQL
string?</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=086031710-18062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV> </DIV>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align=left><FONT face=Arial
size=2></FONT> </P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana>Erwin
Craps</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana>Zaakvoerder
</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana size=1><A
href="http://www.ithelps.be/jonathan">www.ithelps.be/jonathan</A></FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"> </P>
<TABLE id=AutoNumber1 style="BORDER-COLLAPSE: collapse" borderColor=#111111
width="100%" border=1>
<TBODY>
<TR>
<TD width="100%"><FONT face=Verdana size=1>
<P align=center>This E-mail is confidential, may be legally privileged,
and is for the intended recipient only. Access, disclosure, copying,
distribution, or reliance on any of it by anyone else is prohibited and
may be a criminal offence. Please delete if obtained in error and E-mail
confirmation to the sender.</FONT></P></TD></TR></TBODY></TABLE>
<DIV align=center>
<P style="MARGIN-TOP: 5px; MARGIN-BOTTOM: 3px"><B><FONT face=Verdana
color=#000080>IT Helps - I.T. Help Center </FONT></B><FONT face=Symbol
color=#000080 size=2> · <FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT>
</FONT><B><FONT face=Verdana color=#000080> B</FONT></B><FONT
face=Verdana color=#000080><B>ox Office Belgium &
Luxembourg</B></FONT></P>
<P style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px"><FONT face=Verdana
color=#808080 size=2><A href="http://www.ithelps.be/"
eudora="autourl">www.ithelps.be</A> </FONT><FONT face=Symbol
color=#808080 size=2>·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT
size=2><FONT face=Verdana color=#808080> <A
href="http://www.boxoffice.be/">www.boxoffice.be</A> </FONT><FONT
face=Symbol color=#808080>·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT>
</FONT></FONT><FONT face=Verdana color=#808080><FONT size=2> </FONT><A
href="http://www.stadleuven.be/"><FONT
size=2>www.stadleuven.be</FONT></A></FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>IT Helps bvba</FONT><FONT face=Symbol color=#808080
size=1> <FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> · <FONT
face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT size=1><FONT face=Verdana
color=#808080>Mercatorpad 3 </FONT><FONT face=Symbol
color=#808080> ·</FONT></FONT><FONT face=Verdana color=#808080
size=1> 3000 Leuven</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>IT Helps </FONT><FONT face=Symbol color=#808080
size=1>·</FONT><FONT face=Verdana color=#808080 size=1> Phone: +32 16
296 404 </FONT><FONT face=Symbol color=#808080 size=1>·<FONT
face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT face=Verdana color=#808080
size=1> Fax: +32 16 296 405 E-mail: <A
href="mailto:Info@ithelps.be">Info@ithelps.be</A> </FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT face=Verdana
color=#808080 size=1>Box Office </FONT><FONT face=Symbol color=#808080
size=1> ·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT face=Verdana
color=#808080 size=1> Fax: +32 16 296 406 </FONT><FONT face=Symbol
color=#808080 size=1> ·<FONT face="Courier New"></FONT><FONT FACE="Courier New"></FONT> </FONT><FONT
face=Verdana color=#808080><FONT size=1> Box Office E-mail: </FONT><A
href="mailto:figures@boxoffice.be"><FONT
size=1>Staff@boxoffice.be</FONT></A></FONT></P></DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>