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

Strange DTPicker Problem

Status
Not open for further replies.

goldfische

Programmer
Feb 6, 2003
5
US
Hello,
I have a strange problem with a Date picker, I have a couple on a form that are all the same except for the names. The checkbox is enabled on all of them and the coding is all the same except for their names. One of the DTPickers keeps giving me an error after I add a new recordset, it is an Invalid property value, Even if I dont even use it to store the date. All the field properties in the access 2000 database are set the same.
I set temp after my sql statement which is running fine. The error occurs when I go back to view the selected recordset I just added. Has anyone come across something similar to this? I am using VB 6.0 with the service pack 5. Thank you if you can give me any input and sorry for the long post :)

Here is the code I have:
Set Temp = AdodcDates.Recordset

If IsNull(Temp!DateTwo) Or(Temp!DateTwo) = "" Then
DTPDateTwo.Value = ""
Else
DTPDateTwo.Value = Temp!DateTwo
End If
 
Have checked to insure that the field attributes for the associated database fields are the same. The difference may not be in the code, but it may be in the database. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thank you Cajun for the input but I have all the attributes the same and it still compiles that error at run time. What I noticed though when I mouse over DTPDateTwo.Value = Temp!DateTwo, The quotes are separated " " unlike the other two dates variables which contain no white space. I don't know how it is doing that but like I said the code for all of them are the same.
thanks again :)
 
Did you check the databas field default values and what values you are placing into the fields when you add a new record? Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top