473,562 Members | 2,665 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 9274
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
6573
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
2154
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...
1
2299
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...
14
4951
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...
21
12988
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...
1
1687
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
4759
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...
1
4436
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
2705
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...
0
7577
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...
0
7869
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. ...
1
7627
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7935
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...
0
6221
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...
0
5193
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...
0
3623
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3608
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1191
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.