Título da Dica: Carregar e descarregar todos objetos data de um form
Postada em 1/9/2003 por Ð@®l@n 'num módulo .BAS coloque
Sub ConfigDat(f As Form) Dim ControlesDat As Control For Each ControlesDat In f.Controls If TypeOf ControlesDat Is Data Then ControlesDat.Connect = "; pwd =senha" ControlesDat.DatabaseName = App.Path & "\dados.Mdb" End If Next End Sub
Sub DescarregaDat(f As Form) Dim ControlesDat As Control For Each ControlesDat In f.Controls If TypeOf ControlesDat Is Data Then Set ControlesDat = Nothing End If Next End Sub