Solved

Debug appears when Access Switchboard tries to open

Posted on 2007-03-26
10
384 Views
Last Modified: 2013-11-29
I am receivng debug error when my Switchboard attempts to open.  The system highlights this code when I open Debug...Me("Option" & intOption).Visible = False.  Can anyone tell me why this is happening and how to fix it?  I tried creating a new switchboard and it does the same thing obiviosly I have screwed something up :).
0
Comment
Question by:CudaGal
  • 5
  • 3
  • 2
10 Comments
 
LVL 9

Expert Comment

by:TheSloath
ID: 18796055
Should work fine, unless there isn't a control on the Form called Option1, Option2, ... depending on what the value of intOption is.

Email me an MDB with the form in it and I'll have a look:


email address deleted.
Please do not do that again.
Vee_Mod
Experts Exchange Moderator
0
 

Author Comment

by:CudaGal
ID: 18796106
I sent it to you.  The last time I tried to open it, it gave me a Runtime 2465.  Something about Control 4 missing.
0
 
LVL 9

Expert Comment

by:TheSloath
ID: 18796285
Looks like the switchboard used to have 8 buttons on it, and now there are only 7: Number 4 has been removed.

This stops function FillOptions() working.

Has Command Button 4 been deleted accidentally, or does the code need to be changed to compensate for the removal?
0
 

Author Comment

by:CudaGal
ID: 18796307
I deleted the button because I could not figure out how to fix the command.  My ignorance.
0
 
LVL 84
ID: 18796478
TheSloath: The use of private email exchanges to solve problems if prohibited as an abuse of the points system:  http://www.experts-exchange.com/help.jsp#hi99. You would also be strongly advised NOT to post your email address here at EE, it's constantly being crawled by harvestbots and your email address is probably already in several thousand spamlists ;). I've posted a question in Community Support to have them remove it for you.

CudaGal: Many EE users make use of www.EE-Stuff.com to upload small database files. Any EE user can use it (with their username and password), and you can always delete the file when the question is answered. Also, if you make the file publicly available all Experts have an equal chance at helping.
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 9

Expert Comment

by:TheSloath
ID: 18796513
Oops - Sorry, and cheers for that LSM.
That's about the 3rd time I've done it as well. I'll try and find the community board to see if I can get the others removed.
0
 

Author Comment

by:CudaGal
ID: 18796629
Thanks for the information.  This is just the second time I used this service.  So is there anything that I need to do to remove anything else?  Interetingly enough, I opened The Sloath's email and it took my whole system down.  I wondered if I had really screwed then.

Now can someone tell me how to get the Control button issue fixed on my switchboard?
0
 
LVL 9

Expert Comment

by:TheSloath
ID: 18796681
Either replace the command button you removed (and call it Option4), or slip an IF statement into the loop causing the problem, to stop it trying to use Option4:

For intOption = 2 To conNumButtons
    If intOption <> 4 Then    'Start of IF statement
        Me("Option" & intOption).Visible = False
        Me("Option" & intOption).Visible = False
        Me("OptionLabel" & intOption).Visible = False
    End IF    'End of IF statement
Next intOption
0
 
LVL 9

Accepted Solution

by:
TheSloath earned 500 total points
ID: 18796711
I'd just open the switchboard in design view, select one of the command buttons and it's label already there, copy and paste, then place the new button and label in the correct position, then name correctly: 'Option4' for the button and 'OptionLabel4' for the label.

There doesn't seem to be any reason to not have the 4th button there...
0
 
LVL 84
ID: 18798798
A link to support is at the very top of this webpage on the right side.

Good luck to both, and glad you got your troubles fixed CudaGal.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now