From: kenrav on 27 Feb 2010 16:20 I recently upsized my BE to SQL Server 2008 Express. As expected, my new tables all have a "dbo_" prefix. I can easily do a 'Search & Replace' in my code to accommodate the new names. However, I have a great many combo boxes which reference the original table names in the Data Row Source property that need to be changed. Does anyone know how to do this universally or do I need to change each one individually? Thanks.
From: Douglas J. Steele on 27 Feb 2010 16:31 Why not just rename your linked tables? Dim db As DAO.Database Dim tdf As DAO.TableDef Set db = CurrentDb() For Each tdf In db.TableDefs If Left$(tdf.Name, 4) = "dbo_" Then tdf.Name = Mid$(tdf.Name, 5) End If Next tdf Set tdf = Nothing Set db = Nothing -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "kenrav" <kenrav(a)discussions.microsoft.com> wrote in message news:C622DF98-A97C-4B18-810F-0F2398DEAFBF(a)microsoft.com... >I recently upsized my BE to SQL Server 2008 Express. As expected, my new > tables all have a "dbo_" prefix. I can easily do a 'Search & Replace' in > my > code to accommodate the new names. However, I have a great many combo > boxes > which reference the original table names in the Data Row Source property > that > need to be changed. Does anyone know how to do this universally or do I > need > to change each one individually? Thanks.
From: kenrav on 27 Feb 2010 19:56 Works great! Thanks! Ken "Douglas J. Steele" wrote: > Why not just rename your linked tables? > > Dim db As DAO.Database > Dim tdf As DAO.TableDef > > Set db = CurrentDb() > For Each tdf In db.TableDefs > If Left$(tdf.Name, 4) = "dbo_" Then > tdf.Name = Mid$(tdf.Name, 5) > End If > Next tdf > > Set tdf = Nothing > Set db = Nothing > > -- > Doug Steele, Microsoft Access MVP > http://I.Am/DougSteele > (no private e-mails, please) > > > "kenrav" <kenrav(a)discussions.microsoft.com> wrote in message > news:C622DF98-A97C-4B18-810F-0F2398DEAFBF(a)microsoft.com... > >I recently upsized my BE to SQL Server 2008 Express. As expected, my new > > tables all have a "dbo_" prefix. I can easily do a 'Search & Replace' in > > my > > code to accommodate the new names. However, I have a great many combo > > boxes > > which reference the original table names in the Data Row Source property > > that > > need to be changed. Does anyone know how to do this universally or do I > > need > > to change each one individually? Thanks. > > > . >
|
Pages: 1 Prev: Continuous form / sequential numbering Next: Mouse Move response based on combo box value |