Full Version: Protected Text Boxes in Forms
UtterAccess Forums > Microsoft® Access > Access Forms
Mike15739
Question for all of you out there, I am creating an Access form for this company i am working for and to save time, i used the wizard to create the text boxes for the forms (probably a bad idea) but now whenever i try to add a new record to the form, all my boxes are protected and i can't type in them. But when i add edit old info that i put in through the table, then i can access the boxes. And I can add new records through the table but not the form. Has anyone came across this before because i am lost and on a deadline
Edited by: Mike15739 on Wed Jan 11 14:13:06 EST 2006.
ScottGem
I frequently use the wizard to start my forms, then modify them afterwards. If you are not beling allowed to type in any control on a form, then either the controls arre all locked or the AllowEdits is set to No.
freakazeud
Or as an addition...AllowAdditions is set to NO!
HTH
Good luck
Mike15739
Hey Scott,
Thanks man but where do i find the ability to change AllowEdits to No, i am not seeing in the properties of the text box
freakazeud
Hi,
open the forms properties (click the little black square in the top left corner) then go to the data tab and you should see the mentioned properties.
HTH
Good luck
Mike15739
Hey man, thanks for your help but i am not seeing the data properties, it doesn't give me anything because it is saying i am on the Detail part of the form, where you pretty much put everything. I feel really stupid hahah but i am stuck man, do you think you could help me out. Do you have AIM or MSN Messager and can you look at it for me and make the changes if you can.
Thanks
Mike15739
Well after second look, the properties are all set to Yes (AllowEdit, AllowAdditions). [censored]
freakazeud
Hi,
you really just need to open the form's property window. Open the form in design view, then double click on the little black square on the top left corner on the border...then a new little window pops up and it should have the forms properties displayed. You can then select the data tab and find the settings we have been talking about. This still doesn't mean that that is your problem, but it is a start.
HTH
Good luck
ScottGem
If Allow Edits is set to yes. Then check the Locked property of the individual controls. Or post a copy oif your database.
Mike15739
I figured out why i won't let me add new data in the form, i am reading from two different tables and i guess that causes me not to be able to add new data to the form. I did a test wtih a form using only one table and it worked. Now i just gotta figure out how i am going to change the CompanyCodeID to the CompanyCode I want to display. Thanks everyone for your help
Edited by: Mike15739 on Wed Jan 11 14:54:06 EST 2006.
Mike15739
Ok now that i have that figured out, i am stuck on reading one of the form text boxes from another table (i.e. CompanyCode from the CompanyCode table using the CompanyCodeID from the Company Table.) I just want the Company Code to show, not the CompanyCodeID). Does that make any sense?
Mike15739
Ok now that i have that figured out, i am stuck on reading one of the form text boxes from another table (i.e. CompanyCode from the CompanyCode table using the CompanyCodeID from the Company Table.) I just want the Company Code to show, not the CompanyCodeID). Does that make any sense?
freakazeud
Hi,
create a combobox on your company table and include both fields. Then set the column count of the combo to 2 and the column width to 0,2 . Now only the value you want should show up.
Is that what you want.
HTH
Good luck
Mike15739
Actually, all i am trying to do is read the CompanyCode from the CompanyCode table but the Company table only has a CompanyCodeID that i want to read from the CompanyCode table. On the form, i just want the Company Code to show up next to the company, reading from the CompanyCode table
Mike15739
I try to use the Expression Builder but it won't connect
freakazeud
Why aren't you just combining the values/tables in a query and then base the form on that query. Then you can display whatever you want!
HTH
Good luck
Mike15739
Yeah i think i will try that. I really hate access, i would rather use Microsoft SQL or Oracle haha. thanks for everything man
freakazeud
There is no need to hate access. If you are willing to learn and understand how it functions then it will be your friend and a very powerfull userfriendly tool.
Glad I could assist.
Good luck on future projects!
Mike15739
Ok, i tried the query idea, then it got me back where i started from, where i couldn't add new records because i am using two tables to show on my form.
freakazeud
can you post your actual table structures?
seems like you are creating non updatable queries. There are many reasons for this e.g.:
. Improper join
2. Aggregate functions
3. Multiple non-hierarchial 1-many relationships
4. Security
5. No primary key on a linked table.
All these things will result in a query which is non updatable. Most likely it is a relationship issue.
HTH
Good luck
Mike15739
Exactly, it was because i didn't put in the foreign key (CompanyCodeID) from the Company table in my query. Now it looks like it should work. Thanks for all your help, i really appreciate it
freakazeud
you're welcome.
glad I could assist frown.gif
Good luck on future projects!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.