Question Reserved word usage

BobRoseth

New member
Local time
Today, 13:13
Joined
Feb 5, 2013
Messages
2
I was following a thread about a report that, when printed, requested the contents of a field. The answers said that the field name must be somewhere in the form. My problem is similar, but it appears to have a different cause.

Typically, when a field is requesting user input the dialog box says, "Enter [field name]." However, the dialog box that I receive does NOT have the word "Enter." It just has the word "name."

Let me try to explain. Mistakenly, perhaps, I created a field in the database that had the word "name" as its label, but all in lower case, so I'm not sure if it's a reserved word or not. I have tried to remove this label from the database, but I am getting this curious error. One clue: If I actually enter information in the dialog box, it does not appear anywhere on the report when it prints! So the "error" message is not doing anything fatal but just creating an unnecessary dialog. Any idea how I might go about getting rid of this? I followed instructions in the earlier thread of looking in the recordsource, sorting/grouping or any place else. I have not created any special VisualBasic code where it could hide. I'm stumped.
 
Welcome to the forum.

Name is certainly a reserved word capitalised or otherwise. However it should be more than safe to use as a label, you will run into trouble though if you use a reserved word as an Object or Control name.
 
You might want to post a copy of your DB, it will be far easier to diagnose the problem from that.
 
OK. DB is uploaded. If you run "macro1" it will ask for input twice. The first dialog box is legitimate; it's asking for an academic quarter (spring, summer, autumn). and note it contains the cue word "Enter: followed by a field name, Quarter. That input is replicated throughout the resultant report. But the second dialog box doesn't have a cue and asks simply for "name." and that input appears nowhere that I can find in the report.
 

Attachments

To be honest I can't see where the prompt for Name is coming from, perhaps as Galaxiom suggest there is some corruption in your Report. Try deleting it and recreating it from scratch.

Also I would suggest that you avoid using spaces and other special characters in object and control names, limit yourself to alpha and numeric characters and the underscore. Consider implimneting a naming protocol along the lines of TBL_TableName, QRY_QueryName, FRM_FormName etc. this makes it easy to identify the type of object you are referring to once you start writing code.
 
Have you renamed anything? Name Auto Correct can do some strange things.

I have seen it get confused when a field is changed to the same name as another object.
 
The problem is most likely being caused by either the table name [class year and name] or by the column names [last name] or [class name]. There is no telling what kind of problems you will run into with names like these.
 

Users who are viewing this thread

Back
Top Bottom