Help With Vb Script
Thread Starter
Administrator

Joined: May 2001
Posts: 23,226
Likes: 9
From: Upstate NY
Vehicle: 2010 Genesis 2.0T
Does anyone know where I can find a code for a Reminder Pop Up, thats in vbscript?
I'm helping out a friend who is designing a database thats in Microsoft Access. There needs to be a pop up warning box if a certain field isnt filled out in a form, and the best way to do it in Access is to program this particular pop up in vbscript.
So any help would be much appreciated. smile.gif Thanks.
I'm helping out a friend who is designing a database thats in Microsoft Access. There needs to be a pop up warning box if a certain field isnt filled out in a form, and the best way to do it in Access is to program this particular pop up in vbscript.
So any help would be much appreciated. smile.gif Thanks.
Thread Starter
Administrator

Joined: May 2001
Posts: 23,226
Likes: 9
From: Upstate NY
Vehicle: 2010 Genesis 2.0T
Even if you know of a site where I can go to, to find the codes....that would be alot of help. I looked online at a few sites, but they didnt have anything for reminder pop ups. sad.gif
I havent done vb in 2 years but just looked around and it said some stuff about having to write a code to throw an exception. Ive been doing java for awhile now and it has cade thay throws an exception. Maybe make another program like little box or whaat ever they have in vb and have a method call it to open.
heres some code I found on google, (dont say he didnt search, I just knew the trems that are used):
Dim a As Integer = 2147483647
Dim b As Integer = 0
Dim c As Integer = 0
Try
a += 1
Catch exc As DivideByZeroException
Console.WriteLine("Error: Divide by zero")
Catch exc As OverflowException
Console.WriteLine("Error: Overflow")
Finally
Console.ReadLine()
End Try
hope this helps
heres some search results http://www.google.com/search?hl=en&lr=&q=v...basic+exception
It should be in his vb book
heres some code I found on google, (dont say he didnt search, I just knew the trems that are used):
Dim a As Integer = 2147483647
Dim b As Integer = 0
Dim c As Integer = 0
Try
a += 1
Catch exc As DivideByZeroException
Console.WriteLine("Error: Divide by zero")
Catch exc As OverflowException
Console.WriteLine("Error: Overflow")
Finally
Console.ReadLine()
End Try
hope this helps
heres some search results http://www.google.com/search?hl=en&lr=&q=v...basic+exception
It should be in his vb book
Use the MsgBox() command in the GotFocus event of whatever box you want to control. It'll look something like this:
fieldA_GotFocus
If IsNull(Me.fieldA.Value) Then
Dim result As Variant
result = MsgBox("FieldB cannot be left empty", acDialogOkOnly)
Me.FieldB.SetFocus
End If
End Sub
If you do a search for MsgBox in the VB code builder, you should be able to find the description and figure it out.
fieldA_GotFocus
If IsNull(Me.fieldA.Value) Then
Dim result As Variant
result = MsgBox("FieldB cannot be left empty", acDialogOkOnly)
Me.FieldB.SetFocus
End If
End Sub
If you do a search for MsgBox in the VB code builder, you should be able to find the description and figure it out.


