Using values form dropdown box to set field default value
Posted on 2010-11-17
How can I assign a field's default value from a selected value in dropdown box?
tblStudent table (lists all students and attributes with a school field call tblSchool). I could set the default value of this field to, say "Pacific High School", in design view but more that one school will use this database. I have another table with settings, tblSettings that I keep the school's name. Users can set the name when they first login to the application by selecting their school name in a drop down box. Their selection is written to the tblSettings table, tblSettings_School field.
What I would like to do is when a new record is written the default value for the School field in the tblStudent table will default to the value listed in tblSettings, tblSettings_School field.
I tried setting the default value in design to [tblSettings].[tblSettings_School] but that didn't work.
Any help you can provide would be great
Thanks in advance for this?