?
Solved

Debug appears when Access Switchboard tries to open

Posted on 2007-03-26
10
Medium Priority
?
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 85
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
 
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 2000 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 85
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

801 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