help rt error 3326

  • Thread starter Thread starter J.J.
  • Start date Start date
J

J.J.

hi
i have a problem, my form gives me next message
run-time error 3326
this record set is not updatable
i put two more date/time fileds in it and after i put them on form came that
message.
inputing data into table works.
can anyone help
many many thanks
JJ
 
Do you have a query between the table and the form? If so, open the query
and see if you can add data to it? If not, then the query isn't updateable
so the form won't be either.
 
I have form based on main_table. but i have three more tables containing
Main_ID and one Number_Field. Now I put the Number_Field form all three
tables on the main form too. The problem is i think in relationship. Because
when i enter Number_field values the Main_ID isn't entered automaticly in
each of three tables and then the querys can't work. hope you understood my
problem and have a solution.
many thanks
JJ
 
How did you place the number field from all three tables onto the form? If
the controls are bound controls, their values must come from a field in the
form's Record Source. If they don't, then they are calculated controls and
aren't updateable; however, the rest of the form should still be updateable.
What is the Record Source for the form?
 
record source is Main Table+3 Tables also when i open record souce comes out
query builder. i calculate fields after update of Main_Form but how can i
enter Main_ID(Autonumber) form Main_Table automaticly in each Main_ID of the
three tables i use? what type of relationship should be made from
Table1,2,3_MainID to the MainTable_MainID?
JJ
 
It isn't possible to put "Main Table + 3 Tables" in the Record Source unless
you are using a query as the record source and have the tables in the query.
Have you defined the links between the common fields in the tables in the
Relationships window? Since you're using a query, I ask again, is the query
updateable if you try to enter data directly into the query?
 
no the query isn't updatable. the relationship type was set to one-to-many
but also didn't work.
 
Ok, as stated previously, if the query isn't updateable, the form won't be
either. Please open the query in SQL view and copy and paste the SQL text
into a message.
 
SELECT Gosti.Agencija_ID, Gosti.Gost, Gosti.Dolazak, Gosti.Odlazak,
Gosti.App_ID, Gosti.Br_Osoba_ID, Gosti.Plaæeno_dana, Dani_Iznos.[Broj
_dana], Dani_Iznos.Iznos_EUR, Dani_IznosTZ.IznosTZ, Gosti.Prijava_Dolazak,
Gosti.Prijava_Odlazak, Dani_IznosTZ.[Broj _danaTZ], BT_Djeca.Djeca,
BT_Odrasli.Odrasli, BT_Teen.Teen, Gosti_BT_SUM.IznosBT_Odrasli,
Gosti_BT_SUM.IznosBT_Teen, Gosti_BT_SUM.IznosBT_Djeca
FROM (((((Gosti INNER JOIN Dani_Iznos ON Gosti.Gost_ID = Dani_Iznos.Gost_ID)
INNER JOIN Dani_IznosTZ ON Gosti.Gost_ID = Dani_IznosTZ.Gost_ID) INNER JOIN
Gosti_BT_SUM ON Gosti.Gost_ID = Gosti_BT_SUM.Gost_ID) INNER JOIN BT_Odrasli
ON Gosti.Gost_ID = BT_Odrasli.Gost_ID) INNER JOIN BT_Djeca ON Gosti.Gost_ID
= BT_Djeca.Gost_ID) INNER JOIN BT_Teen ON Gosti.Gost_ID = BT_Teen.Gost_ID;

I hope you understand something. it's in croatian. Gost_ID=Main_ID
And thre tables are: BT_Djeca, BT_Odrasli, BT_Teen with the same
number_fields.
thanks
JJ
 
J.J.,

Since Gosti is the main table, if you add it and one other table the query
is updateable. If you more than one other table the query is not updateable.
It will extract data that is there but won't add data. To add data, you need
to keep is simpler.

It is possible to get this to work, but not recommended. First, in the
Relationships window, set the link between each table to Enforce Referential
Integrity and to Cascade Update Related Fields. Next, right click the
background in the query where the tables are placed and change the query
type from Dynaset to Dynaset (Inconsistent Updates). The Cascade Update will
cause a record to be created in each of the other tables when you create a
record in the main table.

--
Wayne Morgan
MS Access MVP


J.J. said:
SELECT Gosti.Agencija_ID, Gosti.Gost, Gosti.Dolazak, Gosti.Odlazak,
Gosti.App_ID, Gosti.Br_Osoba_ID, Gosti.Plaæeno_dana, Dani_Iznos.[Broj
_dana], Dani_Iznos.Iznos_EUR, Dani_IznosTZ.IznosTZ, Gosti.Prijava_Dolazak,
Gosti.Prijava_Odlazak, Dani_IznosTZ.[Broj _danaTZ], BT_Djeca.Djeca,
BT_Odrasli.Odrasli, BT_Teen.Teen, Gosti_BT_SUM.IznosBT_Odrasli,
Gosti_BT_SUM.IznosBT_Teen, Gosti_BT_SUM.IznosBT_Djeca
FROM (((((Gosti INNER JOIN Dani_Iznos ON Gosti.Gost_ID =
Dani_Iznos.Gost_ID)
INNER JOIN Dani_IznosTZ ON Gosti.Gost_ID = Dani_IznosTZ.Gost_ID) INNER
JOIN
Gosti_BT_SUM ON Gosti.Gost_ID = Gosti_BT_SUM.Gost_ID) INNER JOIN
BT_Odrasli
ON Gosti.Gost_ID = BT_Odrasli.Gost_ID) INNER JOIN BT_Djeca ON
Gosti.Gost_ID
= BT_Djeca.Gost_ID) INNER JOIN BT_Teen ON Gosti.Gost_ID = BT_Teen.Gost_ID;

I hope you understand something. it's in croatian. Gost_ID=Main_ID
And thre tables are: BT_Djeca, BT_Odrasli, BT_Teen with the same
number_fields.
thanks
JJ

Wayne said:
Ok, as stated previously, if the query isn't updateable, the form
won't be either. Please open the query in SQL view and copy and paste
the SQL text into a message.
 
now i get the message you cannot add or change a record because a related
record is required in table 'Gosti'
why?
JJ

Wayne Morgan said:
J.J.,

Since Gosti is the main table, if you add it and one other table the query
is updateable. If you more than one other table the query is not
updateable. It will extract data that is there but won't add data. To add
data, you need to keep is simpler.

It is possible to get this to work, but not recommended. First, in the
Relationships window, set the link between each table to Enforce
Referential Integrity and to Cascade Update Related Fields. Next, right
click the background in the query where the tables are placed and change
the query type from Dynaset to Dynaset (Inconsistent Updates). The Cascade
Update will cause a record to be created in each of the other tables when
you create a record in the main table.

--
Wayne Morgan
MS Access MVP


J.J. said:
SELECT Gosti.Agencija_ID, Gosti.Gost, Gosti.Dolazak, Gosti.Odlazak,
Gosti.App_ID, Gosti.Br_Osoba_ID, Gosti.Plaæeno_dana, Dani_Iznos.[Broj
_dana], Dani_Iznos.Iznos_EUR, Dani_IznosTZ.IznosTZ,
Gosti.Prijava_Dolazak,
Gosti.Prijava_Odlazak, Dani_IznosTZ.[Broj _danaTZ], BT_Djeca.Djeca,
BT_Odrasli.Odrasli, BT_Teen.Teen, Gosti_BT_SUM.IznosBT_Odrasli,
Gosti_BT_SUM.IznosBT_Teen, Gosti_BT_SUM.IznosBT_Djeca
FROM (((((Gosti INNER JOIN Dani_Iznos ON Gosti.Gost_ID =
Dani_Iznos.Gost_ID)
INNER JOIN Dani_IznosTZ ON Gosti.Gost_ID = Dani_IznosTZ.Gost_ID) INNER
JOIN
Gosti_BT_SUM ON Gosti.Gost_ID = Gosti_BT_SUM.Gost_ID) INNER JOIN
BT_Odrasli
ON Gosti.Gost_ID = BT_Odrasli.Gost_ID) INNER JOIN BT_Djeca ON
Gosti.Gost_ID
= BT_Djeca.Gost_ID) INNER JOIN BT_Teen ON Gosti.Gost_ID =
BT_Teen.Gost_ID;

I hope you understand something. it's in croatian. Gost_ID=Main_ID
And thre tables are: BT_Djeca, BT_Odrasli, BT_Teen with the same
number_fields.
thanks
JJ

Wayne said:
Ok, as stated previously, if the query isn't updateable, the form
won't be either. Please open the query in SQL view and copy and paste
the SQL text into a message.


no the query isn't updatable. the relationship type was set to
one-to-many but also didn't work.
 
That was the reason for the Cascade Updates. It will allow the other record
to be created. Without the Cascade Updates, I received the same error you
are reporting.
 
PS.

Try this in the query first. Once you have it working there, since the form
has already been created, it will probably need to be updated also. In the
Form's properties set its recordset type to Dyanset (Inconsistent Updates)
as well.
 
Back
Top