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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form date field to default to unlinked table value

Status
Not open for further replies.

datalore

IS-IT--Management
Nov 18, 2001
10
IE
Hi all,

Hope you are well in this very cold new year (Dublin, Ireland).

I have a table set up, called Work Date, with a field called Work Date, default value set to
Code:
Format(Now(), "dd/mm/yyyy")
.
I have an Autoexec macro set up, so that it opens up a form that has been created based on this table, so that the user can insert a date, either accepting the default or entering a new one.

However, I have also a new form Data Entry based on another table (no relationships defined yet), called Data Entry which has a Date field.

What I want to do is have this Date field default to the value in the Work Date table's Work Date field, but also to remain editable.

Do I need to use the Before Insert event? I have tried this with
Code:
[Date] = [Work Date]![Work Date]
but it reports errors.

What else can I do?

Thanks in advance for anyone's help....

Datalore
 
A thought, why not base the form on a query including both tables (no join necessary), not sure if this will give an updateable query, why not try it?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
thanks Ken...

I tried that but I fail to see how I could run this in real-time.

As I create a new record in Data Entry, I need Date to reference the Work Date each time - basically I need it to populate the Date field in realtime.

I think an update query will not run like this...but maybe I am wrong?

Sorry but I am not very good with access :(

Cheers
Datalore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top