Question Taking user input while opening Database

Ratib Hussaini

Registered User.
Local time
Tomorrow, 03:21
Joined
Nov 7, 2012
Messages
31
Hello everyone, in my database there are fields of type Date/Time, their default value is set to now(). But the problem is that those fields are automatically filled up by English system date. I want my own country's date format, without changing my system date format. So I decided, whenever database is opened it should ask for a date, so the user will give today's date and that date will be used automatically on those fields.

But I dont have any idea how to do it, please help me. Thanks
 
By default Access uses the windows setting for date format. Why would your computer be set to a different format than is standard for your country? If you want to override the default setting, you need to do it for each date field control on each form and report.
 
in my country Hijri Shamsi is used,, today's date in my country is : 09/19/1391,,,,, and in my system (windows 7) today's date is: 12/09/2012. I checked through internet I found that Hijri shamsi is not supported by Windows 7. Please give your ideas to this problem. Thanks
 
You will need to write your own code to convert the date to Hirjri shamsi. Internally dates are stored as double precision numbers. Positive values represent the number of days since Dec 30, 1899 and negative numbers represent the number of days prior to that. So today is Dec 10, 2012 and that is 41253 days since Dec 30, 1899. I couldn't even begin to suggest an algorithm because I don't know how many days per month or months per year your date system supports.

In general, you will have a visible unbound control and a hidden bound control and your code will convert between them. I would suggest keeping the data internally as a standard date time field because that will make it easier to do date arithmetic. If you keep the date as a text string, you'll need to do date calculations yourself also.
 

Users who are viewing this thread

Back
Top Bottom