Alerts when a field is blank

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there anyway I can have a popup box, or an alert to run when a user has
left a form field blank in a form I have designed? I guess what I am trying
to ask is can I make a field mandatory? Some of the fields have macros
already attached to them, if this alert is possible can I also make it work
on one of these fields with a macro already in it. Thank you
Charlie
 
Suzanne,

Thank you, I have looked at this link, and it would be useful if I wanted to
have specific information entered ( I have incorporated a couple of these
after reading this page - thanks). I am really after an alert to show if the
field is left completely blank or ignored. I think the code can be easily
modified, but I am not quite sure how to make it work. I have tried but to
no avial.

Thanks

Charlie
 
Hi Charlie,

Replace the line

If Len(.Result) > 0 And Left$(.Result, 3) <> "KLM" Then

with

If Len(.Result) = 0 Then

and change the error message in the MsgBox statement to something
appropriate (e.g., "This field cannot be left blank").

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
Jay, perfect, thank you very much indeed
Charlie

Jay Freedman said:
Hi Charlie,

Replace the line

If Len(.Result) > 0 And Left$(.Result, 3) <> "KLM" Then

with

If Len(.Result) = 0 Then

and change the error message in the MsgBox statement to something
appropriate (e.g., "This field cannot be left blank").

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top