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

Private variable is not accepting date value

Status
Not open for further replies.

pewilson

Technical User
Mar 9, 2001
52
US
I'm not sure if anyone has come across this problem, but in my Property Let in my class module is not accepting the date value that Im passing from the form. Im actually doing this project in VB, but I thought someone from this forum could lend a helping hand

'Class Module

Private mvarControlDate as Date 'Declaring private variable

-----------------------------------------------------------
Public Property Let ControlDate (ByVal vData as Date)
mvarControlDate = vData
End Property
-----------------------------------------------------------

The vdata = 4/19/02
The mvarControlDate = 12:00:00 AM

When I run a break on property let ControlDate and I hoover over the values inside the property this is what I get. The vdata is correct, but mvarControlDate is incorrect and is the main problem. When I view the record in the database it is saving it as 12/30/1899 which is telling me that is not passing a value through the module correctly.

Im not sure why mvarControlDate is showing 12:00:00 AM when I declared it as a date. I've been working on this for the last 3 days and I'm getting frustrated. If anyone explain why this happening I would be greatly appreciate the help.
Paul
paul_wilson74@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top