Hi all,
Im using the after update event of a field from a bound form to add records
using the recordset object, to a related table. However i'm getting the 3201
error, telling me I must have a related record in the parent table. But i've
just put it in, since the 'afterupdate' wont fire until i have ? It works
fine when i'm changing the record in the parent table, since im not changing
the primary key, but happens when i'm adding a new record.
Any explaination, or advice most welcome
Gerry Abbott 3 1436
Apologies for not testing this further,
It is not working with the update, and uses the 'non-updated' data to update
the related table, not the updated!
"Gerry Abbott" <pl****@ask.ie> wrote in message
news:1a*******************@news.indigo.ie... Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a related record in the parent table. But i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not changing the primary key, but happens when i'm adding a new record.
Any explaination, or advice most welcome
Gerry Abbott
It sounds like you need to save the parent record before adding the new
child ones. The value of the field may be getting updated, but this does not
save the record. If you precede your record-adding code with
DoCmd.RunCommand acCmdSaveRecord
that should help.
"Gerry Abbott" <pl****@ask.ie> wrote in message
news:1a*******************@news.indigo.ie... Hi all, Im using the after update event of a field from a bound form to add
records using the recordset object, to a related table. However i'm getting the
3201 error, telling me I must have a related record in the parent table. But
i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not
changing the primary key, but happens when i'm adding a new record.
Any explaination, or advice most welcome
Gerry Abbott
Hit the nail right on the head
Thanks Dave,
"Dave M" <NO************@DROPTHISisland.net> wrote in message
news:Y9nrd.400583$nl.94527@pd7tw3no... It sounds like you need to save the parent record before adding the new child ones. The value of the field may be getting updated, but this does not save the record. If you precede your record-adding code with
DoCmd.RunCommand acCmdSaveRecord
that should help.
"Gerry Abbott" <pl****@ask.ie> wrote in message news:1a*******************@news.indigo.ie... Hi all, Im using the after update event of a field from a bound form to add records using the recordset object, to a related table. However i'm getting the 3201 error, telling me I must have a related record in the parent table. But i've just put it in, since the 'afterupdate' wont fire until i have ? It works fine when i'm changing the record in the parent table, since im not changing the primary key, but happens when i'm adding a new record.
Any explaination, or advice most welcome
Gerry Abbott
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mary Litten |
last post by:
Hi - (This is my very first post)
I have gotten to this point of registering to post because I have been
spinning my wheels so long, I believe I am all caught up in the weeds.
(and mud)
I have...
|
by: Christa Waggett |
last post by:
Hi, I'm not a programmer but would appreciate some help with the following.
I've been looking at various sites but cannot find the information I
require.
I have a table of strata plans and if we...
|
by: Pamela via AccessMonster.com |
last post by:
Hi;
I have two related tables, Correspondence and EPDBchcklst. The tables are
related via record ID which is autonumber. After a person enters a
correspondence into the DB, they are to click...
|
by: jaYPee |
last post by:
does anyone experienced slowness when updating a dataset using
AcceptChanges?
when calling this code it takes many seconds to update the database
SqlDataAdapter1.Update(DsStudentCourse1)...
|
by: Lars Netzel |
last post by:
A little background:
I use three Datagrids that are in a child parent relation.
I Use Negative Autoincrement on the the DataTables and that's workning nice.
My problem is when I Update these...
| |
by: Jeff |
last post by:
For years I have been using VBA extensively for updating data to tables
after processing. By this I mean if I had to do some intensive processing
that resulted in data in temp tables, I would have...
|
by: kolalakitty |
last post by:
Hopefully someone here can help me/point me in the right direction.
I've found tons of references towards making relations, creating rows,
saving said rows, using datagrids, databinding objects,...
|
by: teammcs |
last post by:
Hey all,
I'm new around here but do Admin over @ PHPHelp.com... I've been developing a project for my degree which is basically based around an ATM machine.
Basically my problem is related to...
|
by: =?Utf-8?B?VmFuZXNzYQ==?= |
last post by:
Hi All!
I am with a situation where I am not getting the right updating to the
form's fields. The situation is the following one:
I have one combobox and one textbox. I am using the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |