473,483 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to delete the missing References for VBA

Dear reader,

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

...........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box) in
the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 13 '05 #1
2 22205
I suggest you perform this task on a machine that has the "Missing"
references installed, after which, you can uninstall those references or
move the project to the machine that is missing the references.

It might prove beneficial if you post the names of the missing references...

Good luck,
Curt
"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader1.nntp.hccnet.n l...
Dear reader,

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

..........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box)
in
the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 13 '05 #2

Seeing the whole of the code would be more useful as in the snippet you show
it would appear that refCurr is a variable, we really need to know the code
around that line.

If you are doing something like this for example

Dim refCurr As Reference

For Each refCurr In References
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next

Then this will fail (if you do have Missing references)

This on the other hand should succeed

Dim refCurr As Reference
Dim intX As Integer

For intX = References.Count To 1 Step -1
Set refCurr = References(intCount)
If refCurr.IsBroken Then
References.Remove refCurr
End If
Next

.... unless the Missing reference is an inbuilt one, but the code could be
changed to

Dim refCurr As Reference
Dim intCount As Integer

For intCount = References.Count To 1 Step -1
Set refCurr = References(intCount)
If Not refCurr.BuiltIn Then
If refCurr.IsBroken Then
References.Remove refCurr
End If
End If
Next

and then you really must disambiguate when checking references in case one
of them is broken so the code should really be.

Dim refCurr As Access.Reference
Dim intCount As Integer

For intCount = Access.References.Count To 1 Step -1
Set refCurr = Access.References(intCount)
If Not refCurr.BuiltIn Then
If refCurr.IsBroken Then
Access.References.Remove refCurr
End If
End If
Next

Now do you see why the surrounding code is important ?

--
Terry Kreft
MVP Microsoft Access
"S. van Beek" <S.******@HCCnet.nl> wrote in message
news:43*********************@reader1.nntp.hccnet.n l...
Dear reader,

For removing a reference in the VBA reference form I receive from Doug
Steele the following code:

..........

References.Remove refCurr

..........

By running this code the following error occur:

Error no. 17

Error description: Can't perform requested operation

The question is how can I unable the tick box (remove tick form tick box) in the VBA references form for the missing (broken) references.

Thanks for any help.

Kind regards,

Simon van Beek

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8850
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB...
2
9349
by: Eric | last post by:
Hi, I'm used to C/C++ where if you "new" something you really need to "delete" it later. Is that also true in javascript? if i do "mydate = new date();" in a function and dont "delete mydate" when...
16
1992
by: cppaddict | last post by:
Hi, I am deleting some objects created by new in my class destructor, and it is causing my application to error at runtime. The code below compiles ok, and also runs fine if I remove the body...
9
10603
by: Robert Schneider | last post by:
Hi to all, I don't understand that: I try to delete a record via JDBC. But I always get the error SQL7008 with the error code 3. It seems that this has something to do with journaling, since the...
14
5756
by: Karl O. Pinc | last post by:
Hi, Thought perhaps some other eyes than mine can tell if I'm doing something wrong here or if there's a bug somewhere. I've never passed a ROWTYPE varaible to a function but I don't see where...
5
6670
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
2
2109
by: jodyblau | last post by:
I have noticed that when I move my database onto a different computer, I often get a message about some reference missing. So I go into the reference list, and find the one that says "Missing,"...
1
2462
by: muralik | last post by:
Hi all, I want to refer to a foreign key in a table and set null on delete and on update cascade it...my commands were as follows.. create table Institute( name ...
3
10528
by: sun919 via DotNetMonster.com | last post by:
hi , i have a question to ask regarding deleting the worksheet basically i have written code which find the select worksheet which work fine but it didn't delete the worksheet from the workbook...
0
7076
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7091
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7131
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7101
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4814
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4517
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
224
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.