|
-
Trying to insert a date within a string in a textbox
I am trying to insert a date within a string in a textbox, such as:
“Mary had a little 23-Jul-06 lamb, its fleece was white as snow. 23-Aug-06”.
Every time I try to insert the date it clears the text from the textbox. I’ve tried everything I can think of, but I’m unable to insert it without clearing the text. The DATE function seems to have a built in ‘clear’ function so each time its called it clears the textbox. Is there a way of disabling this phantom ‘clear’ function? See my coding attempts below:
Private Sub cmdDate_Click()
I've tried the following:
1. Text1.Text = Date
2. dim date as string
text1.text = date
3. text1.text = str(date)
4. text1.text = Format(Now, "dd mmmm yyyy")
End Sub
None of them do what I want. It seems to me that using the STR() function should convert the numeric date to a string that could then be inserted. I don’t know whether there is a textbox property I should be setting at design time that would eliminate the “clearing” effect of the Date function. Can anyone help me? I thank any of you in advance for helping me.
Urbaud
Similar Threads
-
By Martin in forum VB Classic
Replies: 22
Last Post: 12-03-2001, 03:53 AM
-
By bigbastard4 in forum Database
Replies: 2
Last Post: 05-16-2001, 06:24 PM
-
By Fabio Luis De Paoli in forum Java
Replies: 0
Last Post: 03-03-2001, 01:12 PM
-
By chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 07:36 AM
-
By Bob Hines in forum Database
Replies: 7
Last Post: 04-27-2000, 11:14 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks