Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Need help with code

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,161
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need help with code
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Need help with code - 6/13/2001 12:31:28 AM   
  mstargas

 

Posts: 6
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
The code is meant to check if there is a value in the text box. If
there is no value its meant to display a msgbox.

If the value is not a date or is not "-" then the msgbox should
appear.

**********
The Code:*
**********
Case frmInsertCompany.Incorp.value = "" or _
not isDate(frmInsertCompany.Incorp.value)
Ret = False
Msgbox "Incorporated must not be empty, It should be a
Date"
frmInsertCompany.Incorp.value = "-"
 
 
Post #: 1
 
 Re: Need help with code - 6/13/2001 12:33:02 AM   
  cruiser

 

Posts: 25
Score: 0
Joined: 6/4/2001
From: USA
Status: offline
Do you really want something like:

If frmInsertCompany.Incorp.value = "" or
_
not
IsDate(frmInsertCompany.Incorp.value)
Then
Ret = False
Else
MsgBox "Incorporated must not be empty,
" _
& "It should be a Date"
frmInsertCompany.Incorp.value = "-"
End If

Or am I really missing something here?

(in reply to mstargas)
 
 
Post #: 2
 
 Re: Need help with code - 6/13/2001 12:35:50 AM   
  century

 

Posts: 10
Score: 0
Joined: 6/7/2001
From: USA
Status: offline
If Not(frmInsertCompany.Incorp.value =
"-" or _
IsDate(frmInsertCompany.Incorp.value)
Then
Ret = False
MsgBox "Incorporated must not be
empty, " _
& "It should be a Date"
frmInsertCompany.Incorp.value = "-"
End If

(in reply to mstargas)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Need help with code Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts