|
-
Sep 15th, 2000, 12:39 PM
#1
Thread Starter
Junior Member
I have two text boxes side by side. The user enters in a date in the first box in ##/##/## format. When they tab to the next box I would like it to autopopulate with a date 365 calender days from the first box..Any help would be awesome.>Thanks
Adam
-
Sep 15th, 2000, 12:47 PM
#2
if you have VB6 then use the DTPicker- control or the MonthView control from the Microsoft Windows Common Controls-2 6.0
-
Sep 15th, 2000, 12:51 PM
#3
Hyperactive Member
Give this a try:
Code:
Private Sub Command1_Click()
myDate = CDate(Text1.Text)
Text2.Text = DateAdd("d", 365, myDate)
End Sub
Hope this helps.
-
Sep 15th, 2000, 12:58 PM
#4
Hyperactive Member
reeset, two things:
1) thank you for showing me a new function! never knew about the DateAdd
2) it should actually read
Code:
Text2.Text = DateAdd("d", 366, myDate)
you have the number 365, and that makes it show a value of exactly one year minus one day ahead of the passed value.
-
Sep 15th, 2000, 01:00 PM
#5
Thread Starter
Junior Member
will it matter if the text boxes are masked edit boxes??
-
Sep 15th, 2000, 01:02 PM
#6
Thread Starter
Junior Member
Yeah its not working I think because they are masked edit boxes with a mask of ##/##/## anymore help please????
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
|
Click Here to Expand Forum to Full Width
|