C
CW
This is rather a lengthy one...I will try to be clear...
To handle our jobs I have a Main form and 5 subforms on tabs.
Each job is identified by Ref and Surname.
The parent-child link on all forms is Ref-Ref.
Using some code that some kind soul suggested a few months ago, we can
create and subsequently access a folder elsewhere on the network (it's I:\07
Ref Number) to store all the documents and emails and whatever else, relating
to each job. That code is as follows:
Private Sub GoToFolder_Click()
Dim strPath As String
strPath = "I:\07 Ref Number\" & Me.Ref & Me.Surname
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
Shell "explorer.exe " & strPath, vbNormalFocus
End Sub
This (a Folder command button) has been working fine on the Main form and
users wanted it deployed on all the tabbed forms too, so I added it. It works
fine on two of them, but not on the other three!!! When the Folder button
is clicked it produces a VB Compile Error, "Method or data member not found",
and highlights Me.Ref on the third line of code as the problem area.
I have checked the Properties and relationships and links, compared them
minutely with working forms and non-working forms, everything I can think of,
but to no avail!!
Any brainwave suggestions would be VERY much appreciated!!
Many thanks
CW
To handle our jobs I have a Main form and 5 subforms on tabs.
Each job is identified by Ref and Surname.
The parent-child link on all forms is Ref-Ref.
Using some code that some kind soul suggested a few months ago, we can
create and subsequently access a folder elsewhere on the network (it's I:\07
Ref Number) to store all the documents and emails and whatever else, relating
to each job. That code is as follows:
Private Sub GoToFolder_Click()
Dim strPath As String
strPath = "I:\07 Ref Number\" & Me.Ref & Me.Surname
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
End If
Shell "explorer.exe " & strPath, vbNormalFocus
End Sub
This (a Folder command button) has been working fine on the Main form and
users wanted it deployed on all the tabbed forms too, so I added it. It works
fine on two of them, but not on the other three!!! When the Folder button
is clicked it produces a VB Compile Error, "Method or data member not found",
and highlights Me.Ref on the third line of code as the problem area.
I have checked the Properties and relationships and links, compared them
minutely with working forms and non-working forms, everything I can think of,
but to no avail!!
Any brainwave suggestions would be VERY much appreciated!!
Many thanks
CW