Unanswered Questions

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I'm not sure if it is a blessing or a curse, but I have
been asking questions on this site that no one seems to
be able to answer. Is it becoming a notification of
Microsoft's bugs due to my getting deeper into what I am
trying to get out of their product?

In this particular situation, I am conducting a file
search in order to link the user application to the
database file. Using Access's methods, it is not
recognizing changes on load or on multiple drives no
matter where I put the file.

I am able to identify all drives as well as network
drives, but the execute function doesn't seem to be able
to search any drives other than C:, and only on a root
level even with SearchSubFolders = True, and doesn't
recognize if the file has been moved unless I reboot the
system.

I suspect the buffer isn't cleared even when Access is
shutdown and restarted. I don't know why this would
occur, but I know it works for the initial launch after
reboot and not after shutting down Access and restarting
it.

Then, why won't it recognize a partition or a network
drive?

I challenge you!!!!!!!!!!!!!
 
Scott said:
I'm not sure if it is a blessing or a curse, but I have
been asking questions on this site that no one seems to
be able to answer. Is it becoming a notification of
Microsoft's bugs due to my getting deeper into what I am
trying to get out of their product?

In this particular situation, I am conducting a file
search in order to link the user application to the
database file. Using Access's methods, it is not
recognizing changes on load or on multiple drives no
matter where I put the file.

I am able to identify all drives as well as network
drives, but the execute function doesn't seem to be able
to search any drives other than C:, and only on a root
level even with SearchSubFolders = True, and doesn't
recognize if the file has been moved unless I reboot the
system.

I suspect the buffer isn't cleared even when Access is
shutdown and restarted. I don't know why this would
occur, but I know it works for the initial launch after
reboot and not after shutting down Access and restarting
it.

Then, why won't it recognize a partition or a network
drive?

I challenge you!!!!!!!!!!!!!

I've got challenges enough of my own, thank you. Just ask your
question.

However, a quick look around shows me a number of recent questions by
"Scott", posting from (e-mail address removed), of which by
far the majority received replies. So either you aren't seeing the
replies or you aren't happy with the replies you're getting. If the
former is true, you probably won't see this reply either. If the
latter, then you should post followup questions to clarify the responses
or explain why they weren't helpful.

In the case of the particular question you're asking in this message,
you haven't given an explanation of your problem sufficient for me to
guess what it is you're doing and what the problem is, nor have you
posted the code you're using, so there's not much I can say to address
that.
 
-----Original Message-----


I've got challenges enough of my own, thank you. Just ask your
question.

However, a quick look around shows me a number of recent questions by
"Scott", posting from
(e-mail address removed), of which by
far the majority received replies. So either you aren't seeing the
replies or you aren't happy with the replies you're getting. If the
former is true, you probably won't see this reply either. If the
latter, then you should post followup questions to clarify the responses
or explain why they weren't helpful.

In the case of the particular question you're asking in this message,
you haven't given an explanation of your problem sufficient for me to
guess what it is you're doing and what the problem is, nor have you
posted the code you're using, so there's not much I can say to address
that.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
Dirk,

I apologize for my tone. I was getting quite frustrated.
Thanks for your help. I went back to the hyperlink
message again and saw your reply there as well. I just
didn't go back enough times. You may be correct about the
service level. I am on a corporate license for my version
of Office 2002 and the update isn't allowed to be
performed on it. I need to look into that further. That
may be the answer to the question above also.

Anyway, regarding the question above... Here is how I set
it up.
Function fReturnFilePath(strFileName As String, _
strDrive As String) As String

Dim varItm As Variant
Dim strTmp As String

If InStr(strFileName, ".") = 0 Then
msgbox "Sorry!! Need the complete name",
vbCritical
Exit Function
End If

With Application.FileSearch
.NewSearch
.LookIn = strDrive
.SearchSubFolders = True
.FileName = strFileName
.MatchTextExactly = True
.FileType = msoFileTypeDatabases
.Execute
msgbox "There were " & .FoundFiles.Count & _
" file(s) found."
For Each varItm In .FoundFiles
strTmp = fGetFileName(varItm)
If strFileName = strTmp Then
fReturnFilePath = varItm
Exit Function
End If
Next varItm
'If .Execute > 0 Then
'msgbox "There were " & .FoundFiles.Count & _
'" file(s) found."
'For Each varItm In .FoundFiles
'strTmp = fGetFileName(varItm)
'If strFileName = strTmp Then
'fReturnFilePath = varItm
'Exit Function
'End If
'Next varItm
'End If
End With
End Function

Note the section commented out. That is the original
version that wouldn't locate any files. I used the help
files to verify this code. When I added the addition for
loop outside of the if statement it worked, but doesn't
recognize if the file gets moved on re-launching the
application. It only works well again when you reboot the
computer.

Then, I have a partitioned drive and a networked drive.
It doesn't find the file unless it is near the root
level. Do you know if there is a limit to the depth of
folders Access will search? I discovered all this from
placing the file in various locations on all drives for
testing.

Once again, Thanks, Dirk,
Scott
 
Scott said:
Dirk,

I apologize for my tone. I was getting quite frustrated.
Thanks for your help. I went back to the hyperlink
message again and saw your reply there as well. I just
didn't go back enough times. You may be correct about the
service level. I am on a corporate license for my version
of Office 2002 and the update isn't allowed to be
performed on it. I need to look into that further. That
may be the answer to the question above also.

Anyway, regarding the question above... Here is how I set
it up.
Function fReturnFilePath(strFileName As String, _
strDrive As String) As String

Dim varItm As Variant
Dim strTmp As String

If InStr(strFileName, ".") = 0 Then
msgbox "Sorry!! Need the complete name",
vbCritical
Exit Function
End If

With Application.FileSearch
.NewSearch
.LookIn = strDrive
.SearchSubFolders = True
.FileName = strFileName
.MatchTextExactly = True
.FileType = msoFileTypeDatabases
.Execute
msgbox "There were " & .FoundFiles.Count & _
" file(s) found."
For Each varItm In .FoundFiles
strTmp = fGetFileName(varItm)
If strFileName = strTmp Then
fReturnFilePath = varItm
Exit Function
End If
Next varItm
'If .Execute > 0 Then
'msgbox "There were " & .FoundFiles.Count & _
'" file(s) found."
'For Each varItm In .FoundFiles
'strTmp = fGetFileName(varItm)
'If strFileName = strTmp Then
'fReturnFilePath = varItm
'Exit Function
'End If
'Next varItm
'End If
End With
End Function

Note the section commented out. That is the original
version that wouldn't locate any files. I used the help
files to verify this code. When I added the addition for
loop outside of the if statement it worked, but doesn't
recognize if the file gets moved on re-launching the
application. It only works well again when you reboot the
computer.

Then, I have a partitioned drive and a networked drive.
It doesn't find the file unless it is near the root
level. Do you know if there is a limit to the depth of
folders Access will search? I discovered all this from
placing the file in various locations on all drives for
testing.

Once again, Thanks, Dirk,
Scott

I'm a bit confused, as the only difference I see in your two code
examples is that the second, commented-out version is wrapped in an
If/End If construct testing the return code from .Execute. Have I
missed something?

I've never used the FileSearch object except for a quick test, but I
seem to recall that there is at least one bug involving the Indexing
Service in some way -- something like, you have to turn off the Indexing
Service to make it work on Windows 2000. I can't find a reference to it
now, though. There is this KB article, that informs you about file
types that aren't found:

http://support.microsoft.com/default.aspx?scid=kb;en-us;208811

But that's not the problem I was thinking of. A Google Groups search
for "FileSearch bug" in the the *.*access.* groups returns several
pages, but none that pops out at me. You may want to have a look at
them, though. I do know that FileSearch has some tricky properties, and
you have to get them just right. I wonder if the properties and methods
involving "search scopes" are relevant to some of your questions.

The code you posted looks like it came from the Access Web page
http://www.mvps.org/access/api/api0006.htm . If so, have you considered
the WinAPI-based alternative that is also posted on that page? If not
that, then it's fairly easy to write code that recursively searches
directories using the Dir() function.
 
Thanks, Dirk,

Those properties are where I was going next, and yes, I
did get the code from The Access Web. Once I got it, I
searched through all the help files to get educated.

Also, the Execute didn't return a value when it was
wrapped in the IF/End If statement. I added the msgbox to
evaluate for it. When I took it out, it worked fine. It
just added to my frustration because it didn't make any
sense and all the help files showed the same code.

Oh, Service-Pack 3 is out and updated with it and the
hyperlink issue still remains. I don't know what to do
with it because there are no settings to work with and it
doesn't make sense to me as to why only one link would
show as visited. They are all set the same. I know I'm
grasping at straws here, but do you think it could be
from creating the others as a copy of the first and then
just changing the hyperlink subaddress to the correct
form?

Thanks again,
Scott
 
Dirk,

Just wanted to let you know, the hyperlink visited value
is handled by the fore color and back color properties in
this type of setting. Also, I hadn't given you my system
information. I use XP Pro for development and test/setup
on Win 2k on my own network so I end up creating two
versions because the jet libraries are different.

I'll let you know what I discover regarding the search
situation.

Scott
 
Back
Top