473,836 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with command buttons on switchboards and forms.

I'm a teacher using MS Access on an RMConnect 2.4 network. On some
workstations both I and my students sometimes get an error message
when attempting to insert a command button on a form which reads
"Invalid
use of null". The remainder of the options in the Command Button
Wizard are then unavailable and
the button wil not work.
The only solution is to log on to a different workstation.
Any ideas?

My second problem is more user-specific, and has so far only affected
two students. Again this is associated with command buttons, either in
forms or switchboards, such that when the button is clicked an error
message comes up to the effect of "Ambiguous name
detected:books_ click" (actual name varies). This usually loads the
Visual Basic debugger, which is outside the scope of what my students
are doing. I don't have enogh knowledge of Vbasic to sort this anyway.
Again, any ideas?
Nov 12 '05 #1
2 9293
Hi Chris,

The second problem is an easy one! It sounds to me like you are using Access 2000 or
earlier, because Access 2002 has some built-in logic to avoid this type of problem. When
using the command button wizard, Access 2002 will inform the user:

"An event procedure 'CommandButtonN ame_Click' already exists. Please try a new command
button name."

where CommandButtonNa me is the name that the user attempted to enter in the final screen
of the wizard.

The cause of this problem is typically deleting a command button on a form without first
deleting VBA (Visual Basic for Applications) code that is associated with this button. I
call this leaving "spider webs" (unused code procedures) behind in your code. Say you
create a command button, using the wizard, and you name it cmdOpenEmployee sForm. While
VBA code may be beyond the scope of your course, you should be award that the wizard is
creating VBA code for you behind the scenes. Now, if you delete this command button, you
will still have the associated click event procedure named cmdOpenEmployee sForm_Click()
hanging around in your code. Now the student decides that they really needed this command
button, so they repeat the process of using the wizard to create a second command button,
and they name it exactly the same as before: cmdOpenEmployee sForm (or whatever name you
want to use for this example). In Access 2000 and earlier, you will now find two
cmdOpenEmployee sForm_Click() subroutines in the code. Access complains that it doesn't
know which one you really want to run with the ambiguous name error. Here is Microsoft's
explanation of the same error:
http://support.microsoft.com/default...b;en-us;817411

I used to teach Access P/T at Bellevue Community College (Bellevue, WA. USA). I would
always advise my students to delete any code associated with a control, before deleting
the control, to avoid the spider webs. To do this, view the properties for the command
button that you are about to delete. Click on the Event tab. If you see an "Event
Procedure" listed, for any of the possible events, then click on the associated build
button (three dots) to find the subroutine or function. Select the procedure and delete
it. By the way, FMS's Total Access Analyzer software does a great job of detecting unused
procedures like this.

You might also want to teach your students how to find information in the Microsoft
Knowledge Base. I always had my students memorize one URL: support.microso ft.com if they
were going to work with any Microsoft software. Note: there is no www in this URL. If
you search the KB, using "ambiguous name error" (without the quotes) as the search term,
you should be able to find the KB article I show above.

On one occasion, I believe I experienced the first problem that you reported, although its
been so long now that I'm not sure the error message was exactly the same. In any case,
it was definitely an error associated with attempting to use the command button wizard.
If you search the KB for "command button wizard" (again, without the quotes) one of the
articles you will find is titled:

ACC2000: Wizard Names and Their Locations
http://support.microsoft.com/default...b;en-us;208307

Under "Builders", we see that the file used is named acwzmain.mde. In my case, I was able
to fix the problem on this PC by taking a copy of this file from my workstation and
replacing the copy on the student's workstation. An .MDE file is an Access database in
itself. It had apparently become corrupted on the student's workstation.

Good Luck....Teachin g is NOT an easy job! I did it for three years.

Tom Wickerath
_______________ _______________ _______

"Chris Bolus" <go****@b0lus.c om> wrote in message
news:8d******** *************** **@posting.goog le.com...
I'm a teacher using MS Access on an RMConnect 2.4 network. On some
workstations both I and my students sometimes get an error message
when attempting to insert a command button on a form which reads
"Invalid use of null". The remainder of the options in the Command Button
Wizard are then unavailable and
the button wil not work.
The only solution is to log on to a different workstation.
Any ideas?

My second problem is more user-specific, and has so far only affected
two students. Again this is associated with command buttons, either in
forms or switchboards, such that when the button is clicked an error
message comes up to the effect of "Ambiguous name
detected:books_ click" (actual name varies). This usually loads the
Visual Basic debugger, which is outside the scope of what my students
are doing. I don't have enogh knowledge of Vbasic to sort this anyway.
Again, any ideas?
Nov 12 '05 #2
"Tom Wickerath" <AO************ ***********@com cast.net> wrote in message news:<6d******* *************@c omcast.com>...
Hi Chris,

The second problem is an easy one! It sounds to me like you are using Access 2000 You're right.I would
always advise my students to delete any code associated with a control, before deleting
the control, to avoid the spider webs. To do this, view the properties for the command
button that you are about to delete. Click on the Event tab. If you see an "Event
Procedure" listed, for any of the possible events, then click on the associated build
button (three dots) to find the subroutine or function. Select the procedure and delete
it. That's really helpful, thanks.
You might also want to teach your students how to find information in the Microsoft
Knowledge Base. I always had my students memorize one URL: support.microso ft.com Yes, I know about the knowledgebase, just never though to look in this
case. I think however it would prove too technical for many of my
students and confuse them even more.
Under "Builders", we see that the file used is named acwzmain.mde. In my case, I was able
to fix the problem on this PC by taking a copy of this file from my workstation and
replacing the copy on the student's workstation. An .MDE file is an Access database in
itself. It had apparently become corrupted on the student's workstation.
That does sound likely. I'll give it a try. RM Networks can be tricky
with things like this.
Good Luck....Teachin g is NOT an easy job! I did it for three years.

It's even harder in an inner city (by definition, not by location)
school which is in special measures - that's where the inspectors have
said it's not up to scratch and we have to work harder to improve
things else they close us down.

Thanks so much for your help; despite 15 years teaching I'm still a
bit of a beginner with Access.
--
Chris
www.b0lus.com
Nov 12 '05 #3

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

Similar topics

2
6586
by: Dejan M. | last post by:
Can you help me? I have 9 forms in the base. 2 forms are opening as single and 7 as datasheet. Thats OK, but when I used Switchboard manager, with him all of my forms are opened as single. How can I solve this problem. Thanks!
2
2177
by: Terry | last post by:
I have created a switchboard, created using Access 2000. If I put the mouse anywhere on the form, outside of the checkboxes and scroll the wheel backwards, I get the following error. Run-Time Error '-2147217900(8004e14)': Syntax Error (missing operator) in query expression in '>0 and =' I know that the Switchboard probably doesn't cater for this event but sometimes you can't help twiddling the wheel can you?
1
2324
by: bjbounce2002 | last post by:
Hello, I am using forms with command buttons to close form or run action queries. The error messages such as "Null value in required field" or "duplicate value in primary key" are suppressed. The error messages appear when runnign the apend query manually or when closing the form using X, but not when using command buttons. Does anyone know how can the messages be displayed when using command
14
4980
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons for things like delete, save, edit, cancel buttons - in the footer, or on the form detail section? 2. If in the footer, how do you add them to the tab order?
21
13026
by: MLH | last post by:
If I choose a command button on a form in design view, open the properties box and click the Picture property and its wiz button, I'm presented with a lengthy list of pictures. Everything from Add Table, Address Book, Airplane to Underline, Undo, Undo (Rewind). I would like to know where they are stored. I thought it might be c:\program files\microsoft office\office\bitmaps but I don't think so. Anybody know where they are stored and...
1
1694
by: allison | last post by:
I know that switchboards aren't loved in here, but I have a question about them. I have one database that runs in two locations. Can I make two main switchboards (one for each location) that goes to the same database? I am extremely new at this, so please be gentle in your explanation. Thanks for your time.
36
4829
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset based in information passed to the form from another form. The problem I am having is that for each of the case statements the proper records (values and Number of records) are being returned but the movement commands do not work or do not display...
1
4454
by: Bob Alston | last post by:
Trying to install some software on Access 2007. The software works just fine on earlier versions of Access. I have been told that it works on Access 2007 but I have not seen that personally. The command buttons on my user-created forms do not function when it is run under Access 2007. The operating system is Windows XP home SP2.
16
2756
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The database has hundreds of forms and reports. I was asked to go through all the menu forms and determine if all the buttons worked, if there were any problems when either the form or report opened and to come up with a list of the forms and reports...
0
9658
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10824
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10533
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10244
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6975
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3103
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.