I think I just found what is causing the problem, or at least a possible solution.
I have been browsing the Microsoft support page before, but I guess I have overlooked this:
And the link:
http://support.microsoft.com/kb/945674/en-us
I can't check it right now, but I bet this hotfix isn't...
Yeah, I forgot about something.
It works with .Value if the list box doesn't have multiple selection enabled. And it does in my case, so that's where I got it wrong. Sorry about that.
Hi,
I have the same problem/error.
Btw, it doesn't only not delete the (temp) db#.mdb file. The compact and repair process isn't completed.
As the process works, it creates a compacted copy of the database as db#.mdb. After which it replaces the original database (Name.mdb) with this compacted...
If the referred to list box is what I think it is that won't work.
If it's a list box with no inputfield, so you only have the possibility to select and not to type, the values/items returned are:
Me.ViewReport.ItemsSelected(0) --> The index number in the list of the (first) selected item...
Hi there,
You might want to try ".ItemsSelected".
If the list box doesn't have the multiple selection enabled you can get the selected item's name using:
Private Sub OpenReport_Click()
Dim stReportName As String, ItemNr As Integer
ItemNr = Me.ViewReport.ItemsSelected(0)
stReportName =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.