Dates

vb6 Finland
  • 13 years ago

    I am trying to make date booking limts for my booking system. How can I create an validation which allows an booking to be made a week in advance but not more than two months in advance. The date format I use is dd/mm/yyyy.

       Thanks

  • 13 years ago
    dear friend,

                    insert a datepicker control and name it as ord_date in from to get the date and
                    in from_activate() event write the following coding
                   
                                ord_date.mindate=date-7
       

                                now you can enter the date before 7 dsays from the current date.
                                and not possible to enter the other date that excedes the 7 days before



                 regards
              s.saravanaprabhu

















  • 13 years ago

    I couldn't get it to work. Is my code wrong?


    Private Sub date_activate()
    Forms!Date.mindate = Date - 7
    End Sub


                   

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Brevity is the soul of wit” - Shakespeare