I want to do this because I bring alot of data files into access for manipulation and export them as a dbf to use in another software package. I'd like to cut the field lengths down to the longest length records in those fields. I work for a direct mail house and we like to know what our longest fields are for printing purposes. I can do it in our other software but I was hoping there was a way to automate the task in Access.
--- In [email protected], "Databasedude.com" <[EMAIL PROTECTED]> wrote: > > You're correct, DAO Tabledef and its Fields collection. Like you, > however, I wonder "why is this necessary?" > > Bryant > > --- In [email protected], Dennis Jensen > <[EMAIL PROTECTED]> wrote: > > > > Well other than the curiousity question of why would > > you want to? You are going to be dealing with the > > Table Definition Object. I am pretty sure you can get > > access to it from VBA but I'm not 100% sure (I'm > > mostly a VB programming that uses Access). If it > > works like I remember you can gain access to each > > element of a table (thus the fields) without needing > > to know the name of the field. However you will most > > likely need to do it in two steps --- 1) Find out the > > width 2) Then resize the field. Hope that helps. > > > > --- Rocky Epp <[EMAIL PROTECTED]> wrote: > > > Here is my problem, can anyone point me in the right > > direction > > > of how to accomplish this? I'm a > > novice-intermediate VBA > > > user. I want to write a function that will look at > > a table in > > > access and resize each field to the length of the > > longest data > > > in each field. Also, the table may have a different > > number of > > > fields each time and different field names. > > > > > > > > > > > > > > > __________________________________ > > Yahoo! Mail - PC Magazine Editors' Choice 2005 > > http://mail.yahoo.com > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> AIDS in India: A "lurking bomb." Click and help stop AIDS now. http://us.click.yahoo.com/VpTY2A/lzNLAA/yQLSAA/q7folB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessVBACentral/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
