473,781 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very strange error (About DATE)

284 Contributor
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 1692
vb5prgrmr
305 Recognized Expert Contributor
DTP.Refresh...



Good Luck
Jul 5 '10 #2
muddasirmunir
284 Contributor
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 Recognized Expert Expert
@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 Contributor
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
1944
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 persons, some of them ghave two pictures, some of them one or none. Some of them have text. Every person has an indexword as for instance "meyer", there can be a
8
1594
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 "d:\db\db-4.1.25\", which has 16 characters; but when it arrives in the next call it looks more like "d:\db\db-4.1.25\(clubs)", which has 17 characters. What is even more interesting is that the test "if (dir != '\\')" fails when there is a clubs at the...
2
1787
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 to perform some calculations. After some number of iterations, randomly, I'll get an uncaught NullValueException error on one of these calls, as if the class name is being treated as an object reference and is null. Here is some psuedo-code to...
1
1538
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 INTERFACE_API __declspec(dllexport) #else #define INTERFACE_API __declspec(dllimport)
0
1345
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 fashion i have no issues. I do a RegisterClientScriptInclude for the .js files in the code behind of the master. This has no problems my scripts are loaded fine.
1
1326
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 to run project: Could not load file or assembly 'Name' or one of its dependencies. The module was expected to contain an assembly manifest." Where 'name' is the name of the namespace and prject name.
5
2915
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 .Net 1.1, and it doesn't happen all the time, for example, I have a loop to call this stored procedure for 1000 times with different parameter everytime, I may get 1 or 2 such errors. I use MS Enterprise Library as my Database layer component. ...
1
8190
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 was working fine. I added one more row of data to the table and all of a sudden one web method started failing. I initially thought the web service was timing out but after a while the following exception was thrown: The CLR has been unable to...
1
1081
by: shapper | last post by:
Hello, I have a page and two user controls: Page.aspx |--- UserControl_1.ascx |--- UserControl_2.ascx
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.