|
|
|
|
|
Dicas
|
|
Visual Basic (ActiveX/Controles/DLL)
|
|
|
Título da Dica: Como pegar o nome de uma tabela
|
|
|
|
Postada em 27/6/2007 por Jailton Sampaio
jailton_sampaio@hotmail.com
Function NomeTabela(pTable As String) As String On Error GoTo ErrorH
Dim lRst As Recordset
OpenRecordset "Select DSTABELA From TABELA Where MNTABELA LIKE '" & pTable & "%'", lRst
If lRst.EOF Then NomeTabela = pTable Else NomeTabela = lRst("DSTABELA") End If Exit Function ErrorH: If error = "The Microsoft Jet database engine cannot find the input table or query 'TABELA'. Make sure it exists and that its name is spelled correctly." Then NomeTabela = pTable Else Erros err End If End Function
|
|
|
|
|