automatic date formula

Forum home » Delegate support and help forum » Microsoft Access Training and help » Automatic date formula

Automatic date formula

resolvedResolved · High Priority · Version 2003

Gregory has attended:
Access Intermediate course
Access Advanced course

Automatic date formula

Is there a way to enter a formula in a date/time field in a table which automatically enters the current date.

I am trying to have percentage split which gets changed over time. However the current split must always be todays date.

The query is something like this

TradeValue * Split
Where TradeDate > SplitValidFrom && TradeDate <= SplitValidTo


Is there a way for an expression which whenever referenced will give the current date in the SplitValidToField?

If not what is the code to replace null values with todays date in the query.

If any screenshots are required please email to my delegate email address

Many thanks,
Greg

RE: Automatic date formula

Hi Gregory,

Thank you for your question.

Is the SplitValidToField set up as a Date and Time field in the table?

If so, go to Design View of the table and select the field. Go to the Default Value property for the field and type =Date(). This date function will alwaus default the current date in the field.

I hope this answers your question.

Regards

Simon

Wed 9 Feb 2011: Automatically marked as resolved.


 

Access tip:

Deleting duplicate records from a table

You cannot delete records tables where there duplicate records. A way around this is to create a new table which wont hold the duplicates. and then deleting the old table.

1. Use a make-table query based on this table only. IMPORTANT - Ensure that you include all of the fields from your original table or you may loose data.

2. Open the query's property sheet by using VIEW, QUERY, PROPERTIES, and set the Unique Values property to Yes

3. Because you have selected the Unique Values to Yes when you run the query, Access creates a new table without duplicate records. You can now delete the old table and rename the new one.

View all Access hints and tips


Server loaded in 0.07 secs.