MsgBox

A

an

I would like help to incomplet next code.
1st and 2nd fields are alphanumeric type.
3rd field is numeric type.

If [FileName] = Empty Or _
[Path] = Empty Or _
[Point] = Empty Then

MsgBox " Attention: " & Chr(13) _
& " " & Chr(13) _
& " Message.", vbOKOnly + vbExclamation

Abcense:
Code to save and close this form, when trhee fields has
data.
Thanks in advance.
an
 
D

Douglas J. Steele

Try using

If IsNull(Me.FileName) Or _
IsNull(Me.Path) Or _
IsNull(Me.Point) Then
 
A

an

Exactly, DS.

Many thanks fpor your Help!
an
-----Original Message-----
Try using

If IsNull(Me.FileName) Or _
IsNull(Me.Path) Or _
IsNull(Me.Point) Then

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I would like help to incomplet next code.
1st and 2nd fields are alphanumeric type.
3rd field is numeric type.

If [FileName] = Empty Or _
[Path] = Empty Or _
[Point] = Empty Then

MsgBox " Attention: " & Chr(13) _
& " " & Chr(13) _
& " Message.", vbOKOnly + vbExclamation

Abcense:
Code to save and close this form, when trhee fields has
data.
Thanks in advance.
an


.
 
A

an

Sorry.

I think if to completed the fields don't return error.

Thanks.
an
-----Original Message-----
Try using

If IsNull(Me.FileName) Or _
IsNull(Me.Path) Or _
IsNull(Me.Point) Then

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I would like help to incomplet next code.
1st and 2nd fields are alphanumeric type.
3rd field is numeric type.

If [FileName] = Empty Or _
[Path] = Empty Or _
[Point] = Empty Then

MsgBox " Attention: " & Chr(13) _
& " " & Chr(13) _
& " Message.", vbOKOnly + vbExclamation

Abcense:
Code to save and close this form, when trhee fields has
data.
Thanks in advance.
an


.
 
D

Douglas J. Steele

Sorry: I don't understand.

Are you saying that one (or more) of the fields wasn't filled in, yet that
didn't trap the error, or that all the fields were filled in, and it was
still trapped?

Are these bound fields? If so, is the name of the control the same as the
field to which they're bound? If so, try renaming the controls to something
else. I always prefix my text box names with txt, so that it would be:

If IsNull(Me.txtFileName) Or _
IsNull(Me.txtPath) Or _
IsNull(Me.txtPoint) Then

By the way, this may not work if someone starts to fill in the box, and then
erases what they typed. You could try:

If Len(Me.txtFileName & "") = 0 Or _
Len(Me.txtPath & "") = 0 Or _
Len(Me.txtPoint & "") = 0 Then

or even

If Len(Trim$(Me.txtFileName & "")) = 0 Or _
Len(Trim$(Me.txtPath & "")) = 0 Or _
Len(Trim$(Me.txtPoint & "")) = 0 Then


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



an said:
Sorry.

I think if to completed the fields don't return error.

Thanks.
an
-----Original Message-----
Try using

If IsNull(Me.FileName) Or _
IsNull(Me.Path) Or _
IsNull(Me.Point) Then

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I would like help to incomplet next code.
1st and 2nd fields are alphanumeric type.
3rd field is numeric type.

If [FileName] = Empty Or _
[Path] = Empty Or _
[Point] = Empty Then

MsgBox " Attention: " & Chr(13) _
& " " & Chr(13) _
& " Message.", vbOKOnly + vbExclamation

Abcense:
Code to save and close this form, when trhee fields has
data.
Thanks in advance.
an


.
 
A

an

Ok.

I think understand, DJS.

Many thanks for your help.
an
-----Original Message-----
Sorry: I don't understand.

Are you saying that one (or more) of the fields wasn't filled in, yet that
didn't trap the error, or that all the fields were filled in, and it was
still trapped?

Are these bound fields? If so, is the name of the control the same as the
field to which they're bound? If so, try renaming the controls to something
else. I always prefix my text box names with txt, so that it would be:

If IsNull(Me.txtFileName) Or _
IsNull(Me.txtPath) Or _
IsNull(Me.txtPoint) Then

By the way, this may not work if someone starts to fill in the box, and then
erases what they typed. You could try:

If Len(Me.txtFileName & "") = 0 Or _
Len(Me.txtPath & "") = 0 Or _
Len(Me.txtPoint & "") = 0 Then

or even

If Len(Trim$(Me.txtFileName & "")) = 0 Or _
Len(Trim$(Me.txtPath & "")) = 0 Or _
Len(Trim$(Me.txtPoint & "")) = 0 Then


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Sorry.

I think if to completed the fields don't return error.

Thanks.
an
-----Original Message-----
Try using

If IsNull(Me.FileName) Or _
IsNull(Me.Path) Or _
IsNull(Me.Point) Then

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I would like help to incomplet next code.
1st and 2nd fields are alphanumeric type.
3rd field is numeric type.

If [FileName] = Empty Or _
[Path] = Empty Or _
[Point] = Empty Then

MsgBox " Attention: " & Chr(13) _
& " " & Chr(13) _
& " Message.", vbOKOnly + vbExclamation

Abcense:
Code to save and close this form, when trhee fields has
data.
Thanks in advance.
an



.


.
 

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

Top