Using a value from a field in one table as default value for field in another table

  • Thread starter Thread starter thesofa
  • Start date Start date
T

thesofa

Guest
Hi,
Can you please help me to use the value from one of 5 fields in a table of only one record, as the default value in either a field in a different table or as the default value in a control on a subform in a form.
The values I need to use are in short date format and they are the date values for the 5 weekdays of the preceding week. These are set by inputing the last day of the previous week via a parameter query through a form.
This value is then used in an update query in a table called "Week"
(imaginative names abound here)
The other fields are Mon, Tue, Wed, Thu, and Fri, each containing the date for the day.
The next week the data is replaced with the new dates.
I then need to use the value from the fields Mon to Fri as the default value in the Mon to Fri subforms.
How can I do this please.
TIA
thesofa
 
the,

Access has some wonderful date functions. Instead of
storing (and maintaining) these in a table, look up the
use of functions such as DateAdd.

Wayne
 
Thank you Wayne, I have had a good look at those functions, the one that may be useful, DateAdd has to have the field that you want to work from in the form. To get that field on the form I have to use the table in the query to which the form is linked. That is not possible as the Week table is just there to look up the dates for the days of the week, for one week only.
Is it possible to ask for a date when I start the database, using a parameter wuery as I am doing now, then assign that value to some sort of variable for the session that I will be using the database. Like a constant, but the constant will have a different value the next time I use the app?
The main problem is I do not know the right questions to ask!
Really appreciate your help:-)
 
sorted

Thanks one and all, I have managed to do what I want using DMax
WOOOOOOOOOOOOOOOOOHOOOOOOOOOOOOOOOOO
Days of head scratching over.
 

Users who are viewing this thread

Back
Top Bottom