|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Initialise data variables
Could someone please tell me how to initialise a date variable.
I tried dtDate = 0 AND dtDate = "" but neither of these works. All suggestions will be welcome. |
|
#2
|
|||
|
|||
|
Initialize the variable to what? And is this just a local variable in your VB code?
|
|
#3
|
|||
|
|||
|
Initialize it to an empty value.
It is a global variable and it will already have a value when the user moves to the form. There I need to delete its value. |
|
#4
|
|||
|
|||
|
How is it declared?
We would need to know the data type before telling you how to initialise it... ![]()
__________________
~ Eric http://www.rlisolutions.com http://www.programmers-corner.com Sign Up for our Programming Newsletter |
|
#5
|
|||
|
|||
|
I need to set a date variable to a null value.
I need to do this for two date varaiables. I found a way to do this for one date variable. The code is: dtDateMin = "#00/00/00#" I also need to do this for the variable dtDateMax. I tried the exact same thing but when I run the code it returns a data type mismatch error. Would anyone know what the problem is? If it works for one, it should also work for the other. Thanks |
|
#6
|
|||
|
|||
|
I am not sure I have understand you correct. But is this what you are looking for?
Code:
Dim dtDateMin As Date Dim dtDateMax As Date dtDateMin = #5/1/2004# dtDateMax = #5/1/2005# dtDateMin = 0 dtDateMax = 0 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Initialise data variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|