StorM_GmA
01-03-2008, 10:05 AM
hello!
i'm creating a multi-form application with VB6 using database, and in a form i have some text boxes. I am trying to name one of them "txtCustLastName" but the VB says " 'txtCustLastName' is a control name". I don't understand what it means. I have other text boxes named txtCustFirstName and txtCustID and i had no problem. Why it doesn't allow me to use that name?
Thanks!
the master
01-03-2008, 10:33 AM
Can you upload your project or at least just your form please. I cant think what it is but maybe we might see something if we have a look
StorM_GmA
01-03-2008, 11:39 AM
here's a screenshot but I don't think it will help
http://i151.photobucket.com/albums/s139/StorM_GmA/VBform-1.jpg
there is no code yet, just the design and the names of the items. When I type "txtCustLastName" to the right (at the field (Name) which is hilighted in the screen shot) and press enter, i get the error you see!
Robert Collins
01-03-2008, 11:48 AM
If VB says the name is already a control name then it probably is. Check and recheck all controls for their names. Are you misspelling anything?
StorM_GmA
01-03-2008, 11:49 AM
yea but what it means with "control"? text boxes, labels etc?
Robert Collins
01-03-2008, 11:56 AM
A control is any control. Text boxes, Combo boxes, Labels, aanything you drag on the Form is a control.
NOTE
You could start over and begin with the problem name and see what happens when you go to name the other controls
the master
01-03-2008, 11:58 AM
It is a different control. If it was the same type of control then it would ask you to create an array instead
StorM_GmA
01-03-2008, 11:58 AM
duh...ok I found the problem...I named a label "txtCustLastName" instead of "lblCustLastName"...damm...I spent lot of time to find it...
thanks alot for your help guys!
edit: yea i thought to start it over and I made a last check before to that, but happily I found the problem :D
the master
01-03-2008, 12:00 PM
For future reference you can use the combo box above the properties to find a name if you believe its already in use
StorM_GmA
01-03-2008, 12:01 PM
yea thanks for the tip! Simple tho but I didn't know it...I'm new in VB obviously :D
the master
01-03-2008, 12:08 PM
It doesnt matter how new you are. Things like that happen. I frequently rename forms and controls when i mean to paste something somewhere