RE: Launch Pop Up on Null Value in field



Have you checked the bound column is text - but on thinking about it it
should not really make any difference. The control is either null or Not -
if it is null the code should trip if not then nothing will happen.




--
Wayne
Manchester, England.



"Paul" wrote:

On the form, these are all combo boxes.

The data populating them is text, and it is querying the options available
in the combo box from an associated table that holds the values with two
fields, one a text field and one a number field. The number field is just
used for sorting purposes, the text field is what is displayed in the combo
box.

Thanks

"Wayne-I-M" wrote:

Hi Paul

I just set up a small table and form to copy the code and run it and it
works fine.

Are the fields Priority, Condition and Category all text fields - number
fields or a mixture


--
Wayne
Manchester, England.



"Paul" wrote:

Wayne, this is partly working.

If I write it as you have shown, I get an error:
Runtime Error '13': Type Mismatch

If I go into Debug, the line below is highlighted:
If IsNull(Me.Priority Or Me.Condition Or Me.Category) Then

However, if I limit it to checking just one of the fields, i.e.,
Me.Priority, it works fine.

I think it may have to do with how to handle it if there IS in fact a value
populated in the field so it is NOT Null.

Do you agree? So if the value is NOT Null, then how should I bypass it and
keep going?

Thanks!

"Wayne-I-M" wrote:

Or use this

Private Sub Form_Open(Cancel As Integer)
If IsNull(Me.Priority Or Me.Condition Or Me.Category) Then
DoCmd.OpenForm "Reminder", acNormal, "", "", , acNormal
End If
End Sub

Think this looks a little cleaner

--
Wayne
Manchester, England.



"Paul" wrote:

I want to launch a pop up form I created called 'Reminder' whenever a record
is opened on my Projects form and one or more of 3 fields is null.

The fields are:
Priority
Condition
Category

Having a bit of trouble, so any help would be appreciated. Thanks!
.



Relevant Pages

  • RE: Launch Pop Up on Null Value in field
    ... "Paul" wrote: ... The control name is the name of the control on the form that is linked ... Runtime Error '13': Type Mismatch ... is opened on my Projects form and one or more of 3 fields is null. ...
    (microsoft.public.access.forms)
  • RE: Launch Pop Up on Null Value in field
    ... "Paul" wrote: ... The control name is the name of the control on the form that is linked ... Runtime Error '13': Type Mismatch ... is opened on my Projects form and one or more of 3 fields is null. ...
    (microsoft.public.access.forms)
  • RE: Launch Pop Up on Null Value in field
    ... The data populating them is text, and it is querying the options available ... "Paul" wrote: ... Runtime Error '13': Type Mismatch ...
    (microsoft.public.access.forms)
  • RE: Launch Pop Up on Null Value in field
    ... "Paul" wrote: ... The control name is the name of the control on the form that is linked ... Runtime Error '13': Type Mismatch ... is opened on my Projects form and one or more of 3 fields is null. ...
    (microsoft.public.access.forms)
  • RE: Launch Pop Up on Null Value in field
    ... The control name is the name of the control on the form that is linked ... "Paul" wrote: ... Runtime Error '13': Type Mismatch ... is opened on my Projects form and one or more of 3 fields is null. ...
    (microsoft.public.access.forms)

Loading