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!

Default to Today

Status
Not open for further replies.

JockVSJock

Technical User
Jun 28, 2001
59
US
Have an Access form that I use at work, but it always defaults to the 1st record which was back in July, and I want it to default to today's date.

Any ideas?

thanks,

-Chris
 
I am going to assume that you mean it goes to the oldest record when you open the form and you want it to go the most current record.

In the form's design view, go to the record source property, hit the button that has the three dots and that will invoke a query builder if a query has not already been built. At this point you just need to sort (descending) by the date in question. ljprodev@yahoo.com
ProDev, MS Access Applications B-)
 

I already have records here feeding into a master table. Once I altered the Record Source, it did default to today's date, but gave weird values on for example name field apears as '#Name?.'

thanks,

 
In the record source query be sure that you do not have a field in your grid twice. If you use the asterik (*) for all records then pull down certain fields (date and name) for sorting then that field is in there twice. This could cause the name of the field in your field list to be different from what you called it in the beginning. Look at the control source of the NAME field and see what is in the list. ljprodev@yahoo.com
ProDev, MS Access Applications B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top