Sub ColocaPrimeiraLetraMaiuscula()
Aonde está a vermelho da erro ao depurar no 2007.
'Muda todas as palavras da tabela para inicial maíuscula
'By JPaulo ® Maximo Access
Dim db As Database, rst As Recordset, camp As Field
Set db = CurrentDb
'Set rst = db.OpenRecordset("ConsultasSeguros")
Set rst = db.OpenRecordset("select * from " & "[" & Tabela & "]")
If Not (rst.EOF) Then
Do Until rst.EOF
For Each camp In rst.Fields
If camp.Name <> "Field Name" _
And camp.Value <> "" _
And camp.Type = 10 _
And Not IsNumeric(camp) _
And camp.Attributes = 34 Then
Debug.Print StrConv(camp.Value, vbProperCase);
With rst
.Edit
camp.Value = StrConv(camp.Value, vbProperCase)
.Update
End With
End If
Next
rst.MoveNext
Loop
End If
End Sub
Nesta também dá erro no 2007
Function Desactivar()
Dim db As Database, rsBancos As Recordset
Set db = CurrentDb
' Set rsBancos = db.OpenRecordset("Bancos")
Set rsBancos = Me.RecordsetClone
rsBancos.MoveFirst
Do Until rsBancos.EOF
If rsBancos!Imprimir = True Then
rsBancos.Edit
rsBancos!Imprimir = False
rsBancos.Update
End If
rsBancos.MoveNext
Loop
rsBancos.Close
db.Close
Me.Requery
End Function
Aonde está a vermelho da erro ao depurar no 2007.
'Muda todas as palavras da tabela para inicial maíuscula
'By JPaulo ® Maximo Access
Dim db As Database, rst As Recordset, camp As Field
Set db = CurrentDb
'Set rst = db.OpenRecordset("ConsultasSeguros")
Set rst = db.OpenRecordset("select * from " & "[" & Tabela & "]")
If Not (rst.EOF) Then
Do Until rst.EOF
For Each camp In rst.Fields
If camp.Name <> "Field Name" _
And camp.Value <> "" _
And camp.Type = 10 _
And Not IsNumeric(camp) _
And camp.Attributes = 34 Then
Debug.Print StrConv(camp.Value, vbProperCase);
With rst
.Edit
camp.Value = StrConv(camp.Value, vbProperCase)
.Update
End With
End If
Next
rst.MoveNext
Loop
End If
End Sub
Nesta também dá erro no 2007
Function Desactivar()
Dim db As Database, rsBancos As Recordset
Set db = CurrentDb
' Set rsBancos = db.OpenRecordset("Bancos")
Set rsBancos = Me.RecordsetClone
rsBancos.MoveFirst
Do Until rsBancos.EOF
If rsBancos!Imprimir = True Then
rsBancos.Edit
rsBancos!Imprimir = False
rsBancos.Update
End If
rsBancos.MoveNext
Loop
rsBancos.Close
db.Close
Me.Requery
End Function