By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,449 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

Create a warning.

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.