Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can an update query change a default setting? 1

Status
Not open for further replies.

MrsNic

Instructor
Feb 6, 2005
44
GB
I am writing a database where the year has to be entered e.g. 2004-05 or 2005-06

To aid data entry I have made the year a default value, is it possible to change this with an update query at the end of the year?

I know I could change the current settings but that is not what I want to do

Thanks
 
Not sure what you mean.
An update query will change the data in the field.
Why not just change the default value in the table or form?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I was trying to avoid users having to make changes in the tables/forms. I wanted to add a button that would change the default as the users are not experienced database users.

Thanks for the advice

Cath
 
I didn't realize from your orig post that this is something that you wanted the users to do. Usually it's a DBA responsibility.

How about this: have a little table called AdminDefault, with one field called DefaultValue.

For your table, have no default value specified.

On the form, put in the OnCurrent event:

if me.txtBox = "" or isnull(me.txtBox) then
me.txtBox = dlookup("DefaultValue","AdminDefault")
end if

then have a place somewhere (I usually have a "Maintenance" form) where a special user(s) can change the one field from like '04-05' to '05-06', then every record will have that value from then on.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top