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

Using a date field as a form link

Status
Not open for further replies.

marioman

Technical User
May 13, 2002
6
GB
Hello,

I have created a table with the date as the primary key (date format is Uk - dd/mm/yyy). On a form, I have used the date as the link to another form. Access converts the date to american format (mm/dd/yyy) during the process so shows the wrong date's information on the second form.

I have read that there is a bug in Access 2000 regarding dates and wondered if anyone knows of a workaround (other than switching to US format dates which does work but is not ideal).

Cheers
 

It really is not a good idea to use a date as a primary key since it assures that you are going to have only one record for any given date which certainly will guarantee a relatively small table. As far as a problem between US and European dates, why not use the American style and then format your display European. Yourvalue = format(AmericanDate,”dd/mm/yy”).
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Thanks for the quick response.

The date is the primary because i am creating a diary-like database so there will only be one entry per date (trust me).

With regards to setting the format to American dates, I am based in the UK and don't really want to change my regional settings to US as this will effect the dates throughout my whole OS.

Surely there must be some magical code to solve this issue, I can't be the only one!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top