Click here to Skip to main content
16,005,169 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How to properly add records to a database through formatted databound textboxes Pin
FrankyT28-May-06 21:34
FrankyT28-May-06 21:34 
GeneralRe: How to properly add records to a database through formatted databound textboxes Pin
JDFA29-May-06 11:08
JDFA29-May-06 11:08 
GeneralRe: How to properly add records to a database through formatted databound textboxes Pin
FrankyT2-Jun-06 16:02
FrankyT2-Jun-06 16:02 
Questionhow to disable only close buuton Pin
iramg28-May-06 9:21
iramg28-May-06 9:21 
AnswerRe: how to disable only close buuton Pin
Roy Heil28-May-06 11:26
professionalRoy Heil28-May-06 11:26 
AnswerRe: how to disable only close buuton Pin
Tamimi - Code28-May-06 19:38
Tamimi - Code28-May-06 19:38 
QuestionWorking with dates Pin
MichMar28-May-06 6:24
MichMar28-May-06 6:24 
AnswerRe: Working with dates Pin
HaloZa28-May-06 8:29
HaloZa28-May-06 8:29 
With the day, month and year being inserted separately ... it can be easy to check.
some normal logic
You will ask the year first because of leap years and stuff.
Next the month will be enetered in

if EnteredMonth > 0 and EnteredMonth < 13 then<br />
'month is a correct month<br />
else<br />
'month is not correct<br />
end if


then when u know the month you can demine if the month has 30/31/28 or 29 days and the day can be checked to see if it falls in the bounds

here is just a basic layout that you can change to suit your variables ect .. i think that more than explains it how i would go about it

<br />
if year = leapyear then<br />
<br />
<br />
else ' not a leap year<br />
  if month = 4 or month = 6 the 'all the months that have 30 days<br />
    if enteredday > 0 and enteredday < 31 then<br />
       'date is correct<br />
     else  <br />
       'error <br />
     end if<br />
  end if<br />
<br />
  if month = 5 or month = 3 then 'all the months that have 31 days<br />
   if enteredday > 0 and enteredday < 32 then<br />
     'date is correct<br />
   else  <br />
     'error <br />
   end if<br />
 <br />
  if month = 2 then 'month is feburary<br />
  end if<br />
<br />
end if<br />
<br />
end if

AnswerRe: Working with dates Pin
Guerven29-May-06 18:21
Guerven29-May-06 18:21 
QuestionHow can I tarnish a color? Pin
Niamorh28-May-06 5:34
Niamorh28-May-06 5:34 
AnswerRe: How can I tarnish a color? Pin
Christian Graus28-May-06 11:10
protectorChristian Graus28-May-06 11:10 
GeneralRe: How can I tarnish a color? Pin
Niamorh28-May-06 11:28
Niamorh28-May-06 11:28 
GeneralRe: How can I tarnish a color? Pin
Christian Graus28-May-06 11:33
protectorChristian Graus28-May-06 11:33 
GeneralRe: How can I tarnish a color? Pin
Niamorh28-May-06 11:49
Niamorh28-May-06 11:49 
QuestionQuestion about put window on top off all other windows. Pin
Yanshof27-May-06 18:42
Yanshof27-May-06 18:42 
AnswerRe: Question about put window on top off all other windows. Pin
kumarprabhakar7428-May-06 18:52
kumarprabhakar7428-May-06 18:52 
QuestionAdd Click Event to Task Pane Item Pin
UBigDummie27-May-06 18:41
UBigDummie27-May-06 18:41 
QuestionMultithreading Problem Pin
sujanakar27-May-06 18:31
sujanakar27-May-06 18:31 
AnswerRe: Multithreading Problem Pin
arcticbrew28-May-06 9:24
arcticbrew28-May-06 9:24 
GeneralRe: Multithreading Problem Pin
sujanakar31-May-06 17:59
sujanakar31-May-06 17:59 
QuestionHow do I play a .wav file from Resources? Pin
furjaw27-May-06 17:50
furjaw27-May-06 17:50 
QuestionHelp with Message Box Colors Pin
JRay565927-May-06 15:16
JRay565927-May-06 15:16 
AnswerRe: Help with Message Box Colors Pin
HaloZa28-May-06 8:41
HaloZa28-May-06 8:41 
QuestionRe: Help with Message Box Colors Pin
JRay565929-May-06 12:40
JRay565929-May-06 12:40 
Questionhelp me Pin
bawades27-May-06 5:38
bawades27-May-06 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.