J
javiernews via AccessMonster.com
Hi,
I'm using this code but it does Not work for all forms. I have to repeat the
process several times to success.
Const cPrefixForm As String = "frm"
Dim accAppNew As New Access.Application
Dim obj As Object
Dim strObjCurr As String
Dim strObjNew As String
accAppNew.OpenCurrentDatabase "C:\My Documents\Customers.mdb", True
accAppNew.Visible = False
For Each obj In accAppNew.CurrentProject.AllForms
strObjCurr = obj.Name
If Left$(strObjCurr, Len(cPrefixForm)) <> cPrefixForm Then
strObjNew = cPrefixForm & strObjCurr
accAppNew.DoCmd.Rename strObjNew, acForm, strObjCurr
End If
Next obj
What am I doing wrong ???
Thank you
I'm using this code but it does Not work for all forms. I have to repeat the
process several times to success.
Const cPrefixForm As String = "frm"
Dim accAppNew As New Access.Application
Dim obj As Object
Dim strObjCurr As String
Dim strObjNew As String
accAppNew.OpenCurrentDatabase "C:\My Documents\Customers.mdb", True
accAppNew.Visible = False
For Each obj In accAppNew.CurrentProject.AllForms
strObjCurr = obj.Name
If Left$(strObjCurr, Len(cPrefixForm)) <> cPrefixForm Then
strObjNew = cPrefixForm & strObjCurr
accAppNew.DoCmd.Rename strObjNew, acForm, strObjCurr
End If
Next obj
What am I doing wrong ???
Thank you