Computing.Net > Forums > Programming > visual basic and access...date/time

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

visual basic and access...date/time

Reply to Message Icon

Name: monkey
Date: May 29, 2002 at 13:43:00 Pacific
Comment:

i need to know if there is a way of checking if the date/time in a text box is empty.
Does anyone know how?
I tried this:
if form.txtbirthday.value = "" then
'do whatever
end if

...but that doesn't work because the quotes only work for the string data type...I tried using ## instead, but it is giving me a compiler error...any help soon would be greatly appreciated..thanx!
monkey



Sponsored Link
Ads by Google

Response Number 1
Name: Fred
Date: May 29, 2002 at 22:05:14 Pacific
Reply:

Try
if Len(form.txtbirthday.value) = 0 then
....


0

Response Number 2
Name: An uncertainty H
Date: May 30, 2002 at 01:09:14 Pacific
Reply:

From memory, so it might be wrong:

If you knock off ".Value" I think your statement will work. (Otherwise, go with the Len() suggestion)

Tom


0

Response Number 3
Name: An uncertainty H
Date: May 30, 2002 at 05:45:09 Pacific
Reply:

or change it to ".Caption" or ".Label" or something...

Tom (being a GREAT deal of help...)


0

Response Number 4
Name: fred
Date: May 31, 2002 at 21:14:08 Pacific
Reply:

Ah ha! Sorry I didnt notice the "txtbirthday.value=" should be "txtbirthday.text=" or as --> An uncertainty H <-- said use the default value and use just "txtbirthday="!


0

Response Number 5
Name: Victor Geisler
Date: July 11, 2002 at 17:20:40 Pacific
Reply:

I've got a date/time issue, but not really VBA. It's more of a very interesting formatting issue. If you can help, I'd be extremely thankful. Here it is:

I converted one of our Access 97 applications to Access 2002. Let's call the database XYZ. XYZ is a multi-user database, operated on a network with Citrix software. There are several text boxes within various forms which are suppose to default to the current date, per the "Date()" setting (and did so properly in Access 97). However, the converted datebase, XYZ (now in Access 2002), does not recognize the "Date()" function/setting, even though it DOES recognize the "Now()" setting/function (the latter function will yield the current date AND time). I get an error message within the text box which states "Name?". Interestingly, the "Date()" IS indexed as an available function setting--it just doesn't seem to work in the converted database. But it gets even 'weirder'.

If I create a new blank Access 2002 database on the network, and then a new form, the "Date()" function operates correctly on the network. However, if I create a new form in the converted database, it does not work. In otherwords, it just doesn't seem to function in the "converted" database, XYZ.

Here's one more interesting thing to throw into the mix. When I move the converted database to my local pc, the "Date()" function works fine. Let me summarize by putting this into bullet points:

* "Date()" function does not work on our Network in the converted XYZ database (now Access 2002, which originated in Access 97), although it DOES work for "newly" created Access 2002 databases.
* When I move XYZ over to my local pc, the database works fine.

How do I fix our XYZ database, which is now in Access 2002? Remember, newly created databases work fine.

Please email me your thoughts on how to solve this perplexing issue--I would greatly appreciate it.

victorgeisler@yahoo.com


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: visual basic and access...date/time

visual basic and access www.computing.net/answers/programming/visual-basic-and-access/3097.html

visual basic and access www.computing.net/answers/programming/visual-basic-and-access/7215.html

visual basic and C# www.computing.net/answers/programming/visual-basic-and-c/1113.html