This is a repost, I hope with a better explanation:
1. Create 3 tables, all with 2 fields:
Table 1: Field IDnr (Autonumber,key ) and Field Test1 (Alpha50)
Table 2: Field IDnr (Number,key) and Field Test2 (Alpha50)
Table 3: Field IDnr (Number,key) and Field Test3 (Alpha50)
2. In the relation window link on IDnr: table 2 to table 1 (1x1) and table 3
to table 1 (1x1).
3. Create a form via the Wizard and select all fields of those 3 tables to
show up in the form.
4. Run the form and enter "X" into field Test1
5. Tab to field Test2 and again enter "X"
6. Press PageUp and PageDown again
7. Now enter "X" into field Test3
8. Move the cursor to field Test1
9. You will see that the IDnr field of table 3 has gotten the right ID
number.
10. However, the IDnr field of table 2 (which previously got the right ID
number) is
suddenly set to zero. Strangely enough the link with the master record is
still in tact, but it will give 'key and double value' errors later when you
proceed entering other records.
If I skip step 6, this doesn't happen.
How is this possible and more importantly, how can I prevent this nasty
behavior from
happening? Access 2000 and 2002.
Thanks,
john 15 1654
Possibly, if you posted somewhere, a db containing (just) the tables
and form, more people would examine what you describe and comment. If
you have nowhere to do this, rename the extension to "dat" or something
else innocuous, e-mail it to me (I'm assuming it's small) and I'll post
it for you so that it can be downloaded with a click.
My problems in following up what you say are these:
99.44%of all bugs reported here are not bugs; they are errors by the
poster.
90% of all posters here aren't up front with their subject; they forget
or deliberatly neglect to mention they are doing something else
bizarre, operating in some unusual environment, say jdbc, or they
present an example which is not exactly like the real situation they
want to describe.
It's unlikely that I will ever be involved with the problem you
describe, viz showing three tables linked 1-1 on one form. (I think
that's it).
You may be the exception of course, and you may be raising a valid
point. But it's not worth my time to make the three tables and the form
to find out. But a download? Maybe.
Of course, I've probably wasted as much time now in writing this as I
would have followng up your instructions. Oh well, it's 07:21 here and
not enough coffee yet.
Thanks. I've send the mdb (dat) to you.
It's unlikely that I will ever be involved with the problem you
describe, viz showing three tables linked 1-1 on one form. (I think
that's it).
See my answer to David W. Fenton in "Re: Is this a bug?".
john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht
news:11******** *************@m 73g2000cwd.goog legroups.com...
Possibly, if you posted somewhere, a db containing (just) the tables
and form, more people would examine what you describe and comment. If
you have nowhere to do this, rename the extension to "dat" or something
else innocuous, e-mail it to me (I'm assuming it's small) and I'll post
it for you so that it can be downloaded with a click.
My problems in following up what you say are these:
99.44%of all bugs reported here are not bugs; they are errors by the
poster.
90% of all posters here aren't up front with their subject; they forget
or deliberatly neglect to mention they are doing something else
bizarre, operating in some unusual environment, say jdbc, or they
present an example which is not exactly like the real situation they
want to describe.
It's unlikely that I will ever be involved with the problem you
describe, viz showing three tables linked 1-1 on one form. (I think
that's it).
You may be the exception of course, and you may be raising a valid
point. But it's not worth my time to make the three tables and the form
to find out. But a download? Maybe.
Of course, I've probably wasted as much time now in writing this as I
would have followng up your instructions. Oh well, it's 07:21 here and
not enough coffee yet.
Download works but Access won't open it because of security issues that may
arise. It says that if I want to open the file I should copy it to my
computer or an available network location. But the file actually is already
on my PC.
john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
John has sent me this file and it is available for download at
http://www.ffdba.com/downloads/losing id.dat
or
http://www.ffdba.com/downloads/losingid.dat
I hope I haven't screwed it up in the process of copying.
While it's not necessary, one may wish to rename the file extension to
mdb.
John, right-click the file in Windows Explorer (My Computer), and choose
Propereties. You might need to hid the Unblock button.
Without testing this fully, I don't believe this is a bug.
You have 3 tables, with unenforced relations.
You have default values set on the Number fields.
Description
========
Step 1: By entering an X in Test1, you trigger a new record.
At this point Access assigns the autonumber for the new record in Table1.
Step 2: Now you have begun entering a new record for Table2.
This table has a Default Value of zero, in the absence any better
suggestion, Access overrides that and assigns the same number as the
AutoNumber from Table1, so you have a match. So far, so good.
Step 3. The effect of the PageUp and PageDown is to save the record. You now
have one record in Table1, one record in Table2, and nothing in Table3.
Step 4. When you enter a value into Test3, you are starting to add the new
record.
Access assigns the zero default value for the number.
Then it quickly realises that this does not match, and changes it to match
the autonumber from Table1.
But in the mean time, at some point in that process, the zero default value
that was there in Table3 is also assigned to the matching field in Table2.
Analysis
======
There is so much ambiguity about what "ought" to be happening here, that I
don't think I could call this a bug:
a) You have nonsense default values (I know they are defaults) in the
primary keys.
b) You have unenforced relationships, so anything goes.
c) You have a Y-shaped relation, and so the dependencies are circular.
d) Access is trying to be too clever in assigning the key values, and makes
a poor decision based on the poor data structure.
e) You are trying to create records in 3 tables using just one form.
f) You have inner joins as the source of the form, so records will
"disappear" from the form, even when 2 of the 3 appear in the table.
To me, that's not a bug. It is understandable that Access gets confused and
makes poor choices in this case of a nonsense data structure (circular
unenforced relationships with faulty defaults) in a meaningless interface.
--
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.
"john" <jo**@test.comw rote in message
news:K9******** ************@ca sema.nl...
Download works but Access won't open it because of security issues that
may arise. It says that if I want to open the file I should copy it to my
computer or an available network location. But the file actually is
already on my PC.
john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
>John has sent me this file and it is available for download at
http://www.ffdba.com/downloads/losing id.dat
or
http://www.ffdba.com/downloads/losingid.dat
I hope I haven't screwed it up in the process of copying.
While it's not necessary, one may wish to rename the file extension to mdb
Thanks for reviewing it and your help.
I was not aware that numeric fields get default-zero by default. I don't
think that's intuitive, and I guess that's why it didn't even cross my mind
to look there. Anyway, after removing the defaults, it works normally!
b) You have unenforced relationships, so anything goes.
Can you explain what you mean by that?
c) You have a Y-shaped relation, and so the dependencies are circular.
Also with this one: Can you explain what you mean by that?
To me, that's not a bug. It is understandable that Access gets confused
and makes poor choices in this case of a nonsense data structure (circular
unenforced relationships with faulty defaults) in a meaningless interface.
I certainly agree it's not a bug.
What I don't get is why this data structure is so bad (apart from the
zero-defaults).
Do you mean it's strange to have one parent table with two 1x1 child tables?
I'm new to Access and that's probably why I don't see why it is so bad to
have 3 tables in one form.
In fact, in the real app where this error came occured I have one form that
include:
one parent table, three 1x1 childs, and two subforms with both a 1xM child
table.
john
"Allen Browne" <Al*********@Se eSig.Invalidsch reef in bericht
news:44******** *************** @per-qv1-newsreader-01.iinet.net.au ...
John, right-click the file in Windows Explorer (My Computer), and choose
Propereties. You might need to hid the Unblock button.
Without testing this fully, I don't believe this is a bug.
You have 3 tables, with unenforced relations.
You have default values set on the Number fields.
Description
========
Step 1: By entering an X in Test1, you trigger a new record.
At this point Access assigns the autonumber for the new record in Table1.
Step 2: Now you have begun entering a new record for Table2.
This table has a Default Value of zero, in the absence any better
suggestion, Access overrides that and assigns the same number as the
AutoNumber from Table1, so you have a match. So far, so good.
Step 3. The effect of the PageUp and PageDown is to save the record. You
now have one record in Table1, one record in Table2, and nothing in
Table3.
Step 4. When you enter a value into Test3, you are starting to add the new
record.
Access assigns the zero default value for the number.
Then it quickly realises that this does not match, and changes it to match
the autonumber from Table1.
But in the mean time, at some point in that process, the zero default
value that was there in Table3 is also assigned to the matching field in
Table2.
Analysis
======
There is so much ambiguity about what "ought" to be happening here, that I
don't think I could call this a bug:
a) You have nonsense default values (I know they are defaults) in the
primary keys.
b) You have unenforced relationships, so anything goes.
c) You have a Y-shaped relation, and so the dependencies are circular.
d) Access is trying to be too clever in assigning the key values, and
makes a poor decision based on the poor data structure.
e) You are trying to create records in 3 tables using just one form.
f) You have inner joins as the source of the form, so records will
"disappear" from the form, even when 2 of the 3 appear in the table.
To me, that's not a bug. It is understandable that Access gets confused
and makes poor choices in this case of a nonsense data structure (circular
unenforced relationships with faulty defaults) in a meaningless interface.
--
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.
"john" <jo**@test.comw rote in message
news:K9******** ************@ca sema.nl...
>Download works but Access won't open it because of security issues that may arise. It says that if I want to open the file I should copy it to my computer or an available network location. But the file actually is already on my PC. john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht news:11******* *************** @h48g2000cwc.go oglegroups.com. ..
>>John has sent me this file and it is available for download at
http://www.ffdba.com/downloads/losing id.dat
or
http://www.ffdba.com/downloads/losingid.dat
I hope I haven't screwed it up in the process of copying.
While it's not necessary, one may wish to rename the file extension to mdb
Thanks again Lyle, for making this available!
john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
John has sent me this file and it is available for download at
http://www.ffdba.com/downloads/losing id.dat
or
http://www.ffdba.com/downloads/losingid.dat
I hope I haven't screwed it up in the process of copying.
While it's not necessary, one may wish to rename the file extension to
mdb.
The zero-default has always been there, and has always been a pain. It is
gone for the first time in the Access 2007 beta. We're pretty pleased about
that!
Re (b)
In the relationships window, double-click the line joining the tables. The
"Enforce Referential Integrity" box is not checked. Access will therefore
permit bad data in the tables (i.e. the foreign key can contain values that
do not match anything in the primary key of the primary table.)
Re (c)
You have defined relations from:
Table1 =Table2
Table1 =Table3.
but the RecordSource of your form has relations:
Table1 =Table2
Table2 =Table3
so even if you did enforce the 2 relations when you created them, there
would still be no enforced relation between Table2 and Table3.
In general, one-to-one relations are unusual. They are sometimes (correctly)
used for subclassing. They are often used (wrongly) because someone can't
stuff enough fields into one table, and are seeking to get around the
255-column limit. Personally, I can think of one 1-to-1 relation I've
created in the last 12 months, out of literally thousands of relations I've
created in developement and sample databases.
In most cases, a form will feed one table mainly. It might have a lookup
table or two in its RecordSource, but it won't seek to add new records to
those tables as well. If you open Northwind, you will see that's how most of
the forms ar designed. The Orders form gets its records from Orders Qry
(based on Customers + Orders), but it only adds records to Orders. The
Orders Subform is based on a query that gets records from Order Details +
Products, but only adds records to Order Details.
It is too confusing for the user when records disappear from the form
because they are not found in all 3 tables (as in your case), or where
records are duplicated in the form (as happens in a one to many relation
where there are many related records.) So you normally want a main form
(bound to the primary table) and a subform (bound to the related table),
with combos to handle the lookups.
If it's any help, there's a free utilitiy here:
Database Issue Checker Utility
at: http://www.allenbrowne.com/AppIssueChecker.html
You can download it and have it check your database for a range of issues,
including unenforced relations, foreign keys that allow nulls, text fields
that allow zero-length strings, tables that have no primary key, field/table
names that are reserved words or names that may be ambiguous, and so on.
All the best for your Access work.
--
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.
"john" <jo**@test.comw rote in message
news:QK******** ************@ca sema.nl...
>
Thanks for reviewing it and your help.
I was not aware that numeric fields get default-zero by default. I don't
think that's intuitive, and I guess that's why it didn't even cross my
mind to look there. Anyway, after removing the defaults, it works
normally!
>b) You have unenforced relationships, so anything goes.
Can you explain what you mean by that?
>c) You have a Y-shaped relation, and so the dependencies are circular.
Also with this one: Can you explain what you mean by that?
>To me, that's not a bug. It is understandable that Access gets confused and makes poor choices in this case of a nonsense data structure (circular unenforced relationships with faulty defaults) in a meaningless interface.
I certainly agree it's not a bug.
What I don't get is why this data structure is so bad (apart from the
zero-defaults).
Do you mean it's strange to have one parent table with two 1x1 child
tables?
I'm new to Access and that's probably why I don't see why it is so bad to
have 3 tables in one form.
In fact, in the real app where this error came occured I have one form
that include:
one parent table, three 1x1 childs, and two subforms with both a 1xM child
table.
john
"Allen Browne" <Al*********@Se eSig.Invalidsch reef in bericht
news:44******** *************** @per-qv1-newsreader-01.iinet.net.au ...
>John, right-click the file in Windows Explorer (My Computer), and choose Propereties. You might need to hid the Unblock button.
Without testing this fully, I don't believe this is a bug. You have 3 tables, with unenforced relations. You have default values set on the Number fields.
Description ======== Step 1: By entering an X in Test1, you trigger a new record. At this point Access assigns the autonumber for the new record in Table1.
Step 2: Now you have begun entering a new record for Table2. This table has a Default Value of zero, in the absence any better suggestion, Access overrides that and assigns the same number as the AutoNumber from Table1, so you have a match. So far, so good.
Step 3. The effect of the PageUp and PageDown is to save the record. You now have one record in Table1, one record in Table2, and nothing in Table3.
Step 4. When you enter a value into Test3, you are starting to add the new record. Access assigns the zero default value for the number. Then it quickly realises that this does not match, and changes it to match the autonumber from Table1.
But in the mean time, at some point in that process, the zero default value that was there in Table3 is also assigned to the matching field in Table2.
Analysis ====== There is so much ambiguity about what "ought" to be happening here, that I don't think I could call this a bug:
a) You have nonsense default values (I know they are defaults) in the primary keys.
b) You have unenforced relationships, so anything goes.
c) You have a Y-shaped relation, and so the dependencies are circular.
d) Access is trying to be too clever in assigning the key values, and makes a poor decision based on the poor data structure.
e) You are trying to create records in 3 tables using just one form.
f) You have inner joins as the source of the form, so records will "disappear" from the form, even when 2 of the 3 appear in the table.
To me, that's not a bug. It is understandable that Access gets confused and makes poor choices in this case of a nonsense data structure (circular unenforced relationships with faulty defaults) in a meaningless interface.
"john" <jo**@test.comw rote in message news:K9******* *************@c asema.nl...
>>Download works but Access won't open it because of security issues that may arise. It says that if I want to open the file I should copy it to my computer or an available network location. But the file actually is already on my PC. john
"Lyle Fairfield" <ly***********@ aim.comschreef in bericht news:11****** *************** *@h48g2000cwc.g ooglegroups.com ... John has sent me this file and it is available for download at
http://www.ffdba.com/downloads/losing id.dat
or
http://www.ffdba.com/downloads/losingid.dat
I hope I haven't screwed it up in the process of copying.
While it's not necessary, one may wish to rename the file extension to mdb
"Allen Browne" <Al*********@Se eSig.Invalidwro te in
news:44******** *************** @per-qv1-newsreader-01.iinet.net.au :
In most cases, a form will feed one table mainly. It might have a
lookup table or two in its RecordSource, but it won't seek to add
new records to those tables as well. If you open Northwind, you
will see that's how most of the forms ar designed. The Orders form
gets its records from Orders Qry (based on Customers + Orders),
but it only adds records to Orders. The Orders Subform is based on
a query that gets records from Order Details + Products, but only
adds records to Order Details.
I think a form is OK for *two* 1:1 tables. I have an app that's been
in production use since 1999 that puts all the demographic data
about people in the side table, but it's not populated until the
main table's record is marked CLOSED.
It work just fine to have two tables in a form like this. It's the 3
tables that actually cause the problem, seems to me.
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: William C. White |
last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using
cURL? Our website is hosted on a shared drive and the webhost company
doesn't installed additional software (such as cURL) on the server because
of that. Our site will have an SSL certificate next week, so I would like
to use AIM instead of SIM, however, I don't know how...
|
by: Albert Ahtenberg |
last post by:
Hello,
I don't know if it is only me but I was sure that header("Location:url")
redirects the browser instantly to URL, or at least stops the execution of
the code. But appearantely it continues to execute the code until the
browser send his reply to the header instruction. So an exit(); after each
redirection won't hurt at all
|
by: James |
last post by:
Hi,
I have a form with 2 fields.
'A'
'B'
The user completes one of the fields and the form is submitted.
On the results page I want to run a query, but this will change
subject to which field is completed.
|
by: Ollivier Robert |
last post by:
Hello,
I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9
system. The link succeeds but everytime I try to run php, I get a SEGV from
inside the libcnltsh.so library.
354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php
libsablot.so.0 => /usr/local/lib/libsablot.so.0
libstdc++.so.5 => ...
|
by: Richard Galli |
last post by:
I want viewers to compare state laws on a single subject.
Imagine a three-column table with a drop-down box on the top. A viewer
selects a state from the list, and that state's text fills the column below.
The viewer can select states from the drop down lists above the other two
columns as well. If the viewer selects only one, only one...
| |
by: Albert Ahtenberg |
last post by:
Hello,
I have two questions.
1. When the user presses the back button and returns to a form he filled
the form is reseted. How do I leave there the values he inserted?
2. When the user comes back to a page where he had a submitted POST data
the browser keeps telling that the data has expired and asks if repost. How
to avoid...
|
by: inderjit S Gabrie |
last post by:
Hi all
Here is the scenerio ...is it possibly to do this...
i am getting valid course dates output on to a web which i have designed
....all is okay so far , look at the following web url
http://www.mis.gla.ac.uk/biquery/training/
but each of the courses held have maximum of 8 people that could be
|
by: Jack |
last post by:
Hi All,
What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g.
select x from y where z=:parameter
Which in asp/jsp would be followed by some statements to bind a value to :parameter
I dont like the idea of making the SQL statement on the fly without binding parameters as I
dont want a highly polluted SQL cache.
|
by: Sandwick |
last post by:
I am trying to change the size of a drawing so they are all 3x3.
the script below is what i was trying to use to cut it in half ... I
get errors.
I can display the normal picture but not the results of the picture
half the size. The PHP I have installed support 1.62 or higher. And
all I would like to do is take and image and make it fit a...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |