473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Create a warning.

Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!

Jan 5 '07 #1
9 1910
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
radink wrote:
Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!
Jan 5 '07 #2
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.

Thanks!!

ManningFan wrote:
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
radink wrote:
Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!
Jan 5 '07 #3
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.

Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")

radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.

Thanks!!

ManningFan wrote:
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
radink wrote:
Hey all,
>
Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.
>
Thanks!!
Jan 5 '07 #4
OK thanks.

However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.

ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.

Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")

radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.

Thanks!!

ManningFan wrote:
On the BeforeUpdate event, throw in something like;
>
if not isnull(me.fieldname) then
msgbox "Warning!"
end if
>
You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
>
>
radink wrote:
Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!
Jan 5 '07 #5
Try changing:
if not isnull(me.fieldname) then
to:
If Nz(me.fieldname,"") <"" Then

HTH,
Jana

radink wrote:
OK thanks.

However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.

ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.

Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")

radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.
>
Thanks!!
>
ManningFan wrote:
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.


radink wrote:
Hey all,
>
Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.
>
Thanks!!
Jan 5 '07 #6
Jana,

Thanks for replying.

Unfortunately that did not help. It still shows up either way.

Jana wrote:
Try changing:
if not isnull(me.fieldname) then
to:
If Nz(me.fieldname,"") <"" Then

HTH,
Jana

radink wrote:
OK thanks.

However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.

ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.
>
Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")
>
radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.

Thanks!!

ManningFan wrote:
On the BeforeUpdate event, throw in something like;
>
if not isnull(me.fieldname) then
msgbox "Warning!"
end if
>
You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
>
>
radink wrote:
Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!
Jan 5 '07 #7
Radink:

I see what you mean. Try this instead:

If Nz(Me.FieldName.OldValue, "") <"" Then
MsgBox "warning"
End If

HTH,
Jana

radink wrote:
Jana,

Thanks for replying.

Unfortunately that did not help. It still shows up either way.

Jana wrote:
Try changing:
if not isnull(me.fieldname) then
to:
If Nz(me.fieldname,"") <"" Then

HTH,
Jana

radink wrote:
OK thanks.
>
However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.
>
ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.

Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")

radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.
>
Thanks!!
>
ManningFan wrote:
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.


radink wrote:
Hey all,
>
Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.
>
Thanks!!
Jan 5 '07 #8
If Len(Me.Employee.OldValue & "") 0 Then

worked for me.

Thanks!
Jana wrote:
Radink:

I see what you mean. Try this instead:

If Nz(Me.FieldName.OldValue, "") <"" Then
MsgBox "warning"
End If

HTH,
Jana

radink wrote:
Jana,

Thanks for replying.

Unfortunately that did not help. It still shows up either way.

Jana wrote:
Try changing:
if not isnull(me.fieldname) then
to:
If Nz(me.fieldname,"") <"" Then
>
HTH,
Jana
>
radink wrote:
OK thanks.

However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.

ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.
>
Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")
>
radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.

Thanks!!

ManningFan wrote:
On the BeforeUpdate event, throw in something like;
>
if not isnull(me.fieldname) then
msgbox "Warning!"
end if
>
You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.
>
>
radink wrote:
Hey all,

Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.

Thanks!!
Jan 5 '07 #9
Glad I could help :)

Jana
radink wrote:
If Len(Me.Employee.OldValue & "") 0 Then

worked for me.

Thanks!
Jana wrote:
Radink:

I see what you mean. Try this instead:

If Nz(Me.FieldName.OldValue, "") <"" Then
MsgBox "warning"
End If

HTH,
Jana

radink wrote:
Jana,
>
Thanks for replying.
>
Unfortunately that did not help. It still shows up either way.
>
Jana wrote:
Try changing:
if not isnull(me.fieldname) then
to:
If Nz(me.fieldname,"") <"" Then

HTH,
Jana

radink wrote:
OK thanks.
>
However it is not working. It still shows the warning even if the field
is empty to start with.
I have been searching also. Everything I've found seems to have the
same problem, with the warning showing up regardless of the field being
empty or filled. It is a combobox, so I don't know if that matters.
>
ManningFan wrote:
As a rule I only answer 1 question and then you're on your own,
otherwise you won't learn nothin'.

Google the Internet, it can be very helpful. (hint: search "msgbox
vbok" or "msgbox vbyesno")

radink wrote:
This worked! The only other thing I would like is to have that message
box have an ok and cancel button. The ok letting the field change, and
the cancel leaving it alone.
>
Thanks!!
>
ManningFan wrote:
On the BeforeUpdate event, throw in something like;

if not isnull(me.fieldname) then
msgbox "Warning!"
end if

You might need to change the first line to "if me.fieldname is not null
then", I'm not 100% sure about that.


radink wrote:
Hey all,
>
Is there a way to pop up a warning when someone goes to change a field?
I would only like this to occur when the field is NOT empty.
>
Thanks!!
Jan 5 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
3
by: Capstar | last post by:
Hi NG, I have a library of which I want to change the name of a specific method so it is more intuitive. I plan to keep the old method in there for now so I won't break any existing code. But I...
6
by: Rudolf Bargholz | last post by:
Hi , I have the following tables ------------- PAX: Id Order_Id Name Position
6
by: Philip Wagenaar | last post by:
What is the best way to create a local user on the machine with administrator rights? I have problems with my code on machines that have password policy. The problem is that when the user is...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
8
by: Paw | last post by:
Greetings. I use asp. what I need is is when a visitor comes to the site, I need it to check the host name. if "www.hometowndigest.com" is the host, then check a folder named "something" and if...
5
by: Philip Nelson | last post by:
I get - db2inst1@dvorak /db2data $ db2 "create database DBTST001 automatic storage yes on /db2data/db2db dbpath on /db2data/db2db" SQL0805N Package "NULLID.SQLE2F0J 0X4141414141654557" was not...
19
by: loudking | last post by:
Hello, all My manager told me to create a large file of 2GB The first 1GB is filled with "Hello" and the secod 1GB is filled with "World" Sorry to say that I don't know how to do that in...
1
by: Clay Hobbs | last post by:
I already know how to make user-defined exceptions, like this one: class MyException(Exception): pass But for a module I'm making, I would like to make a warning (so it just prints the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.