G
Guest
Greetings all!
I have a time field that holds appointment time. Typically the user will only enter the time. My BE is SQL server 2k and the data type is smalldatetime for this column.
The FE is Access 2002. The date default Access enters if there is no date specified is 12/31/1899 which is out of the date range for smalldatetime and an error is generated.
One way to solve this is to add a couple of days on an AfterUpdate event when the user enters a time. This has problems because the time field will not sort correctly if there are a variety of dates preceding the time. Rather than allow Access to insert a default date, it seems that the best way to resolve this is to enter my own date.
I tried the following syntax ideas:
Me.somefield= CDate("1/1/1990 " & Me.ApptTime)
or
Me.somefield = Me.ApptDate & Me.ApptTime
I get an "wrong data type" error with both.
How have others addressed this issue? Apparently MS Access 2003 has corrected this, but I don't have the ability to update right now.
I have a time field that holds appointment time. Typically the user will only enter the time. My BE is SQL server 2k and the data type is smalldatetime for this column.
The FE is Access 2002. The date default Access enters if there is no date specified is 12/31/1899 which is out of the date range for smalldatetime and an error is generated.
One way to solve this is to add a couple of days on an AfterUpdate event when the user enters a time. This has problems because the time field will not sort correctly if there are a variety of dates preceding the time. Rather than allow Access to insert a default date, it seems that the best way to resolve this is to enter my own date.
I tried the following syntax ideas:
Me.somefield= CDate("1/1/1990 " & Me.ApptTime)
or
Me.somefield = Me.ApptDate & Me.ApptTime
I get an "wrong data type" error with both.
How have others addressed this issue? Apparently MS Access 2003 has corrected this, but I don't have the ability to update right now.