View Full Version : A fiels not found in a form


E-D
01-04-2002, 12:30 PM
A strange thing happens to me :
I have a command button links between two forms. For some starnge reason once I use it, an error message pops up. When I enter the code and use Me. the options I see are customer_CustomerID instead of Customer.CustomerID and the program cannot identify the field although everything seems to be all right in the form itself.
I guess my explanation is not very clear, but does anyone know what can be the reason?

Rich
01-04-2002, 12:44 PM
If you really have a text box named Customer.CustomerID then you should change it for something like say txtCusID take a look at naming conventions too, you shouldn't use dots or spaces in field names.

E-D
01-04-2002, 01:43 PM
I know I should use the right prefix
however, Access automatically generates the names of the fields for me.. so I left the given names as they are.
What about the problem I encountered
Do you have any solution?

Pat Hartman
01-04-2002, 06:59 PM
VB and VBA being real programming languages have much stricter rules than Jet and Access on how object names must be formed. When you are in a code module of any type, you must follow VBA rules. Access is converting the offending character (.) to an underscore (_).

Either change the field name in the table or query so that it does not contain illegal characters or change the control name.

E-D
01-05-2002, 06:58 AM
Thanks. I have managed to fix the problem