473,378 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Very strange error (About DATE)

284 100+
I am using vb6.

Now , I am facing a very strange error. I think it might be due to some other problem rather coding not sure.

Actually , i have put a datepicker in the form and at the load even of form i had use the code

Expand|Select|Wrap|Line Numbers
  1. Date1.value= Date
  2.  
whice change datepicker date to current system date.

Now , i rememberer this was workig fine but when today i comiple and run my progrme , the date is not appearing to the curretn date.

I had checkek there was not syntax error , but amazingly when i show a message box it , its works fine.

Like if i write

Expand|Select|Wrap|Line Numbers
  1. Date1.value= Date
  2. Msgbox Date1.value
  3.  
Now, datepicker in my form show the current system date.

I am not sure what difference that msgbox is doing.

Did any body of you ever accured this type of problem.

Even i had tried to use the code.

Expand|Select|Wrap|Line Numbers
  1.  Date1.value = Date
at activate event , but it will not show correct date until i use a msgbox ?

So strange? donot know what to do. Is there any thing wrong with my sytem date?
Jul 4 '10 #1
4 1674
vb5prgrmr
305 Expert 100+
DTP.Refresh...



Good Luck
Jul 5 '10 #2
muddasirmunir
284 100+
Well this does not work.

Actually , i had modified some code.

I am calling now a function at the load event (I had also set teh value of datepicker equal to current date at load event) , that function first call a function in the same form and the called function again call a function present in the module.

When i disable the functions , the date works fine , but when i enable the function the date does not set to curretn date.

By the way , the was nothing done to datepicker in those functions.
Jul 5 '10 #3
Killer42
8,435 Expert 8TB
@muddasirmunir
Just a thought - can you try setting a watchpoint to break whenever the .Value parameter changes? That'd tell you for sure whether anything is messing with it.

However, from what you said in your original post, it sounds as though the value is set correctly, but the display is simply not refreshed. You might try experimenting with .Refresh, Doevents and similar.

Another thought - could you start out with the datepicker not visible, then make it visible after setting the value? Perhaps that would force the issue.

Also, just out of curiosity, what value is displayed when it doesn't update correctly? When I add a DatePicker control, it seems to start out with the current date in it without any action on my part.

It might help also if you could give us some idea of what those other functions do.
Jul 17 '10 #4
muddasirmunir
284 100+
I had studied it more , now i came that the error is causing becuase i use the keyword

date1.setfocus at activate event of form , when i remove this the date work fine.

Another thing is i am usign skincrafter, to skin the form d, i though this might be causing problem.
Jul 17 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Werner Partner | last post by:
I use a page created by php. It should show two pictures of a person an a short text. If there are no picture, nothing is shown, if there is no text, nothing is shown. There a about 20...
8
by: Noah Roberts | last post by:
There is some windows specific code in this, but I believe the issue to be something standard so... The problem is that after attaching the name of the subdirectory I have something like...
2
by: TB | last post by:
I am seeing a very strange problem as follows... I have a loop where a fair amount of processing is going on and near the top of the loop I access a class that has only static helper functions...
1
by: Marco [Stinger] | last post by:
Hi I'm writing a C# app with VS2003 for WinCE4 / 5 x86. I must call some functions on a Embedded C++ Dll (I have the source code of it). The dll's Header is: #ifdef INTERFACE_EXPORTS #define...
0
by: Ron | last post by:
Hi, I have a client side srcipt control that is giving me some very strange problems when my Master.Page is layed out using <DIV> tags for the UI layout. When it is layedout in a <TABLE> style...
1
by: Wilfried Mestdagh | last post by:
Hello, I start a new windows application in VS2005 (C#), adding 2 classes, try to run my project (in fact not mutch more than a form and a button), and I get following error: "Error while trying...
5
by: Hardy Wang | last post by:
Hi all, I am migrating an old web application developed in .Net 1.1 to .Net 2.0. During my new development and testing, I had following error while executing an stored procedure. It worked fine in...
1
by: Don Rixtown | last post by:
I ran into a very strange error tonight. I was working with web services and typed datasets. The web server I was using happens to be on the other end of a virtual network (Hamachi). Everything...
1
by: shapper | last post by:
Hello, I have a page and two user controls: Page.aspx |--- UserControl_1.ascx |--- UserControl_2.ascx
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.