Bom dia Prezados estou precisando de uma ajuda a minha maquina antiga era o Windows XP e agora e o Windows7 e quando abro o meu arquivo no access aparece o seguinte erro.
Erro de compilação: É impossível localizar o projeto ou biblioteca TVWCHILD.
Segue abaixo o còd.
Private Sub Form_Open(Cancel As Integer)
'Fill TV
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strKey As String
mstrFormArgs = ""
Set db = CurrentDb
Set rs = db.OpenRecordset( _
"SELECT * " & _
"FROM QdrDistribuicao " & _
"ORDER BY QdrDistribuicao.Parente, QdrDistribuicao.Ordem", dbOpenSnapshot, dbReadOnly Or dbForwardOnly)
'Not really required, but - who knows! :-)
tvSB.nodes.Clear
With rs
'Loop through all switchboard-items, adding them to the treeview
While Not .EOF
'Assemble a key for this node, consisting of three arguments:
'
' 1. The ID - required to find a child-node's parent
' 2. The "Object-type" - form, report, etc.
' 3. The "Object-Name" - the name of the form, report, etc.
' 4. Additional stuff (i.e. OpenArgs being passed to a form)
strKey = !Id & ";" & Nz(!TipoObjeto) & ";" & Nz(!NomeObjeto) & ";" & Nz(!Adicional)
If !Parente > 0 Then
'This node is a child-node of some other node;
'Find the parent node and add it below that node's last child
tvSB.nodes.Add getNodeIndex(!Parente), tvwChild, strKey, !NomeTitulo
Else
'There is no parent - add this node to the treeview's root
tvSB.nodes.Add , tvwLast, strKey, !NomeTitulo
End If
.MoveNext
Wend
End With
'Clean up
Set rs = Nothing
Set db = Nothing
'initialize the form / show the main form
Me!Switchboard_Subform.SourceObject = mconMainForm
'Maximize the switchboard
DoCmd.Maximize
End Sub
Erro de compilação: É impossível localizar o projeto ou biblioteca TVWCHILD.
Segue abaixo o còd.
Private Sub Form_Open(Cancel As Integer)
'Fill TV
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strKey As String
mstrFormArgs = ""
Set db = CurrentDb
Set rs = db.OpenRecordset( _
"SELECT * " & _
"FROM QdrDistribuicao " & _
"ORDER BY QdrDistribuicao.Parente, QdrDistribuicao.Ordem", dbOpenSnapshot, dbReadOnly Or dbForwardOnly)
'Not really required, but - who knows! :-)
tvSB.nodes.Clear
With rs
'Loop through all switchboard-items, adding them to the treeview
While Not .EOF
'Assemble a key for this node, consisting of three arguments:
'
' 1. The ID - required to find a child-node's parent
' 2. The "Object-type" - form, report, etc.
' 3. The "Object-Name" - the name of the form, report, etc.
' 4. Additional stuff (i.e. OpenArgs being passed to a form)
strKey = !Id & ";" & Nz(!TipoObjeto) & ";" & Nz(!NomeObjeto) & ";" & Nz(!Adicional)
If !Parente > 0 Then
'This node is a child-node of some other node;
'Find the parent node and add it below that node's last child
tvSB.nodes.Add getNodeIndex(!Parente), tvwChild, strKey, !NomeTitulo
Else
'There is no parent - add this node to the treeview's root
tvSB.nodes.Add , tvwLast, strKey, !NomeTitulo
End If
.MoveNext
Wend
End With
'Clean up
Set rs = Nothing
Set db = Nothing
'initialize the form / show the main form
Me!Switchboard_Subform.SourceObject = mconMainForm
'Maximize the switchboard
DoCmd.Maximize
End Sub