Mark A Matte
markamatte at hotmail.com
Wed Feb 4 09:53:00 CST 2004
Pedro, Just off the top of my head...I would use vba to do it...combining the following functions: I would Start with LISTALLTABLES and loop FIELDNAMES after each table and run the sql(using LCase for each field found) inside the FIELDNAMES loop. I just copied these functions from MSKnowledgeBase and A97 Help. Good luck. Thanks, Mark ******************************************** Function ListAllTables (fld As Control, id As Long, row As _ Long, col As Long, code As Integer) Dim db As Database Dim tbdf As TableDef Static tbls(256) As String Static Entries As Integer Dim i As Integer Dim ReturnVal ReturnVal = Null Select Case code Case LB_INITIALIZE ' Initialize database. Set db = DBEngine.Workspaces(0).databases(0) Entries = 0 For i = 0 To db.tabledefs.count - 1 tbls(Entries) = db.tabledefs(i).name Entries = Entries + 1 Next i ReturnVal = Entries Case LB_OPEN ' Open. ReturnVal = Timer ' Unique ID number for control. Case LB_GETROWCOUNT ' Number of rows. ReturnVal = Entries Case LB_GETCOLUMNCOUNT ' Number of columns. ReturnVal = 1 Case LB_GETCOLUMNWIDTH ' Column width. ReturnVal = -1 ' Use the default width. Case LB_GETVALUE ' Get the data. ReturnVal = tbls(row) Case LB_END ' End. For Entries = 0 To 256 tbls(Entries) = "" Next End Select ListAllTables = ReturnVal End Function ******************************************************* Sub FieldNames() Dim dbs As Database, tdf As TableDef Dim fld As Field ' Return reference to current database. Set dbs = CurrentDb ' Return reference to Employees table. Set tdf = dbs.TableDefs!Employees ' Enumerate all fields in Fields collection of TableDef object. For Each fld in tdf.Fields Debug.Print fld.Name Next fld Set dbs = Nothing End Sub ********************************************************************* >From: pedro at plex.nl >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: AccessD at databaseadvisors.com >Subject: [AccessD] lowercase >Date: Wed, 04 Feb 2004 16:18:21 (MET) > >Hello group, > >what is the quickest way to set al caracters in all fields in all Tables in >a database to lowercase. >I can make a query an do all the fields with an LCase expression, but that >costs a lot of time. > >Any idea's > >TIA > >Pedro Janssen >_______________________________________________ >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com _________________________________________________________________ Get a FREE online virus check for your PC here, from McAfee. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963