Link to home
Start Free TrialLog in
Avatar of HOTWATT
HOTWATTFlag for United States of America

asked on

question about a text field with default value

I created a form with two tabs. Both tabs have the same fields except one of the tabs has an extra field. I want to differentiate the information from each tab but keep it all in the same table. I decided to set up a field called TYPE and make the first tab type RMA and the second tab type INTERNAL. I figured I would do this by adding a locked text box with a default value of RMA linked to the type field in the first tab and then a locked text box with a default value of INTERNAL linked to the type field in the second tab. For some reason the first tab text box will start as RMA as it should but when I start to type into the form it switches from RMA to INTERNAL.

Any idea why this is happening? Anyone have a better idea for what I am trying to accomplish? I added a few pictures to help you understand a little better.

                 Thanks!
RMA.PNG
INTERNAL.PNG
Avatar of PatHartman
PatHartman
Flag of United States of America image

Check the table and see if it has a default specified.  If it does, remove it.  Also set the field to AllowZeroLengthString = No, and make the field required.  That way, no matter how a record gets added, a value will be required in the Type field.  You'll have to update any existing records before Access will allow you to set the field to required.
Avatar of HOTWATT

ASKER

Thing is I don't want them to have to type into the text box on each tab I just want the first text box to already have RMA as the default and locked so it can't be changed and then the second tab would have INTERNAL in the text box as the default value and locked. For some reason the RMA one keeps switching to INTERNAL when anything is typed into the fields on that form. I tried the things you suggested still seems to happening.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I created a form with two tabs. Both tabs have the same fields except one of the tabs has an extra field. I want to differentiate the information from each tab but keep it all in the same table.
Not sure I understand your design here. ?
...perhaps we should start there...?
Avatar of HOTWATT

ASKER

Thanks that worked!