473,688 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?

Nov 13 '05 #1
2 2179
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" <Me*@Privacy.ne t> wrote in message
news:ns******** ************@ro gers.com...
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?

Nov 13 '05 #2

"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ...
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"
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.

--
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" <Me*@Privacy.ne t> wrote in message
news:ns******** ************@ro gers.com...
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?


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2483
by: Mary Ann | last post by:
I have a main form with 4 subforms. One of the subforms reflects other costs/miscellaneous charges that an account might be assessed. The main form includes a field with a total pulled from that other cost subform. The total field reflects the correct amount as long as there is at least one record for the account in the other cost subform. However, many accounts won't have other costs assessed so those accounts are not in the query for...
8
4057
by: Steve | last post by:
I have several pairs of synchronized subforms in an application. I have a Delete button for each pair that uses the following code or similar to delete a record in the second subform: DoCmd.SetWarnings False DoCmd.RunCommand acCmdDeleteRecord DoCmd.SetWarnings True End If ExitHere: Me!SubName.SetFocus
7
11184
by: ChrisR | last post by:
Hi guys My app is a simple Main form with a few Subforms that are not linked, and a few pop forms. Problem is: I have a pop form with a Listbox with a list of records related to the subform in the Main form. I'd like to double click on the selected file in the listbox and load that record into the the Subform, easy
25
10234
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
10
3755
by: robert d via AccessMonster.com | last post by:
I have a global error handler that up until today has been working flawlessly. Let me first provide the relevant code **************************************************************** On Error GoTo Err_Ctrl 'This code is generating the error If Nz(Me.SubformCont.Form!txtUsage,"") = "' Then Msg "There's a problem"
1
3395
by: dBNovice | last post by:
Please help! I have 3 forms: Task, Subtask, Elements. Elements is a subform of Subtask and Subtask is a subform of Task. I am able to navigate from Task to Subform to Element and from Element to Subtask to Task by pressing a button that makes each subform invisible/visible. The problem exists when I try to navigate from Element to Task to Subtask. Sub-subform Element will become invisible and show Task but when I press the button to go...
9
9690
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a master-child link to the first subform. subform2 - Master Field: subTrainingModule.Form!TrainingModuleTopicSK Child Field: TrainingModuleTopicSK
2
2119
by: Andreas | last post by:
Hello together, I want to calculate a sum in subform from a subsubform (sounds complicated?) but I get an #error but... see below My database: I have a main form with members, each members has in a subform from 0-x projects (in the subform) each project can have from 0-x subprojects with working days.
4
1645
MitchR
by: MitchR | last post by:
Good Day Folks; I have found myself in a hole I can't get out. In Access Version 2000 I have a form Called Frm_Main That contains a SubForm Frm_Main_Sub. Frm_Main_Sub's record source is a select query with linked Master and child Data. Frm_Main_Sub dispays two things the Word Returned and a UPS Tracking number.This all works just fine until I decided to be a good samaritan and try to add the ability to Track the Tracking number with a command...
0
9076
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8783
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6454
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5810
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4547
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2219
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1952
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.