473,607 Members | 2,674 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 2166
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
2482
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
4044
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
11181
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
10206
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
3752
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
3393
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
9678
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
2116
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
1644
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
8469
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
8463
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
8128
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
8322
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5997
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
3953
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4013
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2461
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.