Subform error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill Stock

    #1

    Subform error

    I have a subform which is causing a 3314 (Field can't contain a null value
    because required is set to True) error. I solved this problem by trapping it
    in the before update event. But then I started getting a "No Current Record"
    error. I wanted to see what err number was coming through, so I put a MsgBox
    in the subform's error event. But the MsgBox never came up and the error is
    now gone.

    Is the MsgBox pulling the focus away from the subform and preventing the
    error?



  • Allen Browne

    #2
    Re: Subform error

    If this is Access 2002 Service Pack 3, the error might be a spuious one.

    The Error event of the form might have caught it.

    The fact that the error disappeared could be the result of some particular
    combination of data and/or sequence of events, and it might recur under the
    same circumstances. OTOH, it might have been an insipient corruption, so a
    decompile might be in order. Decompile a copy of the database by entering
    something like this at the command prompt while Access is not running. It is
    all one line, and include the quotes:
    "c:\Program Files\Microsoft office\office\m saccess.exe" /decompile
    "c:\MyPath\MyDa tabase.mdb"

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Bill Stock" <Me7@Privacy.ne t> wrote in message
    news:nsudnUKlVe wqrcHeRVn-uw@rogers.com.. .[color=blue]
    >I have a subform which is causing a 3314 (Field can't contain a null value
    >because required is set to True) error. I solved this problem by trapping
    >it in the before update event. But then I started getting a "No Current
    >Record" error. I wanted to see what err number was coming through, so I put
    >a MsgBox in the subform's error event. But the MsgBox never came up and the
    >error is now gone.
    >
    > Is the MsgBox pulling the focus away from the subform and preventing the
    > error?[/color]


    Comment

    • Bill Stock

      #3
      Re: Subform error


      "Allen Browne" <AllenBrowne@Se eSig.Invalid> wrote in message
      news:435c4572$0 $8653$5a62ac22@ per-qv1-newsreader-01.iinet.net.au ...[color=blue]
      > If this is Access 2002 Service Pack 3, the error might be a spuious one.
      >
      > The Error event of the form might have caught it.
      >
      > The fact that the error disappeared could be the result of some particular
      > combination of data and/or sequence of events, and it might recur under
      > the same circumstances. OTOH, it might have been an insipient corruption,
      > so a decompile might be in order. Decompile a copy of the database by
      > entering something like this at the command prompt while Access is not
      > running. It is all one line, and include the quotes:
      > "c:\Program Files\Microsoft office\office\m saccess.exe" /decompile
      > "c:\MyPath\MyDa tabase.mdb"[/color]

      Thanks Allen, It's actually an Access 2000 db. The existing db suffers a lot
      of 2486 errors and a few corrupt forms. (We're in the process of normalizing
      much of the data.) Although I suspect my biggest issue is my approach to
      this largely unbound form. The subform is bound to the parent form and has
      an unbound pseudo subform. The loading of the unbound data is now working
      erratically since I started trapping the 3314 errors. I think I'm going to
      have to unbind the entire subform to give me the error trapping I want.

      [color=blue]
      > --
      > Allen Browne - Microsoft MVP. Perth, Western Australia.
      > Tips for Access users - http://allenbrowne.com/tips.html
      > Reply to group, rather than allenbrowne at mvps dot org.
      >
      > "Bill Stock" <Me7@Privacy.ne t> wrote in message
      > news:nsudnUKlVe wqrcHeRVn-uw@rogers.com.. .[color=green]
      >>I have a subform which is causing a 3314 (Field can't contain a null value
      >>because required is set to True) error. I solved this problem by trapping
      >>it in the before update event. But then I started getting a "No Current
      >>Record" error. I wanted to see what err number was coming through, so I
      >>put a MsgBox in the subform's error event. But the MsgBox never came up
      >>and the error is now gone.
      >>
      >> Is the MsgBox pulling the focus away from the subform and preventing the
      >> error?[/color]
      >
      >[/color]


      Comment

      Working...