473,473 Members | 1,576 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why don't the database relationship fields display correctly in the form?

sueb
379 Contributor
My original database has a single table which contains Patient information and up to 3 "slots" for procedures requested by the doctor. I am working on a split version that contains two tables: Patients and Procedures. At first, when I split the original database, it contained no AutoNumber field, so I simply allowed the relationship to be based on the patient's chart number (which is unique). I've made my new forms based on those new tables, and everything has been great.

My goal all along, however, was to use an autonumber to identify the patients and as the one-to-many join field, so today I added an AutoNumber field to the original database, reworked the join in my two tables (and deleted the current data, of course), then exported the single table into Excel and shoved things around so that I could import into the two joined tables (using the same steps I've been using for the past several weeks, which have worked perfectly).

Now, however, the patient demographic data (chart number, last name, etc.) is being displayed incorrectly in my forms: all the fields are pushed one place "to the right", as though the AutoNumber field is shoving them aside, even though it has no place on any of the forms. When I look at the data in the datasheet, everything looks okay; no field names were changed; and in the forms, the Properties of each field indicate that they are pulling from the correct table field. The data being displayed in the "Chart Number" field (which is the "first" one following the autonumber "Patient Index" field) looks to be a random, single-character value.

I can't figure out what's happened. Any ideas will be greatly appreciated.
Nov 20 '10 #1
14 2146
ADezii
8,834 Recognized Expert Expert
sueb, the only way that I feel we can get an idea of exactly what is/is not going on, is by looking at the actual Database itself, along with a detailed explanation of all the components involved. Can you Upload a scaled-down Version of your DB in Access 2003 format?
Nov 21 '10 #2
sueb
379 Contributor
Okay. I'll do that on Monday when I'm back at work. Thanks!
Nov 21 '10 #3
ADezii
8,834 Recognized Expert Expert
Just be sure to include the specifics inidicating what, exactly, the problem is, and the Objects involved.
Nov 21 '10 #4
sueb
379 Contributor
Okay, I have a version ready to upload, but .mbd is not listed as a valid file extension for attachments. How do I upload this?

Edit: Never mind. I'm zipping them.
Nov 22 '10 #5
sueb
379 Contributor
I'm attaching a .zip that contains my front end and a greatly reduced back end. Although there seem to be patient's names in the data, these names are all made up, so confidentiality is not being breached.

You'll see that on the forms "IURs: Enter New" and "IURs: View/Edit Existing" the data does not show up in the correct fields. On the forms "Patients" and "IURs: subform", it does. The two forms on which it is incorrect are the ones that are displaying data from two tables, across their join; the two forms on which it is correct each display data from a single table. I'm sure that's part of the answer, but I can't figure out what's really going on, especially since before I introduced the AutoNumber, all these forms behaved correctly.
Attached Files
File Type: zip IURs.zip (1.02 MB, 89 views)
Nov 22 '10 #6
Bruce Callander
4 New Member
sueb - I had a quick look at the database. It really needs to be normalised into separate tables. By putting so much into the IUR table you are making it difficult to manage and not gaining the benefits of a relational database. For example there is no need to hard wire a maximum number of three telephone calls against each patient. Make telephone calls a separate table and link them to patients via the unique patient ID. Also, if you ever want to add VBA coding it will be easier if your field names don't have spaces - use an underscore instead of a space. I believe that you need to review of your database structure, otherwise you are likely to encounter an unending string of niggling faults.
Nov 22 '10 #7
sueb
379 Contributor
I am in the process of normalizing the structure (you should have seen it before), and in fact, in this case, 3 call is exactly the limit, for internal process reasons that have nothing to do with the problem I'm having.

I have many years of database experience, but I am maintaining this database in my spare time and have to carefully manage the changes I make to it so that it is NEVER down.

** Edit **
Argumentative comments removed.
Nov 22 '10 #8
sueb
379 Contributor
Bruce, I apologize for the tone of my original reply to you (and, NeoPa, I thank you for editing it). There is no excuse for my responding to you that way; this site has been immeasurably helpful to me. I can only plead the pressure of my deadline and the lack of support here at work.

Again, I'm sorry. Thanks for taking the time to look over what I uploaded.
Nov 22 '10 #9
MMcCarthy
14,534 Recognized Expert Moderator MVP
@sueb

I'm not sure what is going on. I've opened the two forms you say you are having a problem with but both appear fine to me. The Chart Number field on the subform is displaying the value in the Chart number field on the table.

Try running a refresh on the linked tables using the linked table manager and see if that sorts out your problem.

Otherwise I'm not sure what is going on.
Nov 22 '10 #10
ADezii
8,834 Recognized Expert Expert
What is immediately apparent to me is the following:
  1. The Primary Relationship between the Patients and IURs Tables as defined in the Back End Database(IURSTATUS_BE.mdb) is based on [Patient Index], namely:
    Expand|Select|Wrap|Line Numbers
    1. Patients.[Patient Index]{1} ==> IURs.[Patient Index]{MANY}
  2. On the Front End DB, the Parent <==> Child Linkage between the Main and Sub-Forms is based on the [ChartNum] Field, resulting in a misalignment. Change the Linking Fields to [Patient Index].
  3. The Patient Indexes of 31406 and 31392 in the Patients and IURs Tables refer to different Chart Numbers, which they shouldn't.
Nov 22 '10 #11
sueb
379 Contributor
The combined answers of both MMcCarthy and ADezii fixed this right up! You were exactly right, ADezii, about the incorrect linkages, but just before setting out to fix that problem manually I thought I'd try MMcCarthy's linkage refresh suggestion. Turns out that the Link Manager took care of correcting the misalignment!

I guess I assumed that "link means linked", and wouldn't have thought about having to refresh them. However, it makes sense that a change like this might require a little extra boost.

So, thanks again, everyone! I think I'll have this thing completely ready for the deadline of next Monday, thanks to this last important step. I still want to gradually break up the IUR table some more, but this was the big hurdle.

(Oh, and, ADezii? That was some amazing data review you did, catching the mismatch in the Chart Numbers! Thankfully, that was a result of my hacking away a little too hurriedly in my attempt to whittle this down to a size more appropriate for uploading, but I did go back and check that all those numbers lined up right.)
Nov 23 '10 #12
ADezii
8,834 Recognized Expert Expert
Glad that it all worked out for you.
Nov 23 '10 #13
NeoPa
32,556 Recognized Expert Moderator MVP
SueB:
Bruce, I apologize for the tone of my original reply to you (and, NeoPa, I thank you for editing it).
Sue, I have come across your posts on many occasions and have always found it to be a pleasant exerience. I was somewhat surprised to see your post earlier, but your apology and explanation (we all have difficult days so I hope we can sympathise) followed swiftly and gracefully, so I'm happy with the outcome.

PS. I'm glad to see that ADezii and Mary have helped you to resolve your problem between them.
Nov 23 '10 #14
Bruce Callander
4 New Member
SueB - I appreciate your apology but I felt pretty bad when I looked again at my contribution, which in retrospect I agree was completely unhelpful. One lives and learns ...
Nov 24 '10 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the...
3
by: Leinad Kong | last post by:
I'm using Access 2002, as front-end and back-end as well: 1) I faced database corrupted problems, when more than 1 user edit concurrently. I'm using All-records Locking, and open-exclusively as...
1
by: MissiMaths | last post by:
I am creating a reference table of all the information used to draw a sample. I start by first clearing the table in form1 using a delete query. Then after the user selects certain options, i...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
1
by: Miguel Dias Moura | last post by:
Hello, What I know: To send a Value in the URL and filter the results in order to display only the database records which FIELD_A = Value. What I need to do: I have a page with an Input...
2
by: Ville Mattila | last post by:
Hi there, I will post my question to this group too bacause the .data group seems to be rather quiet. I've been playing with VB.NET and ADO for a week now and find the different data handling...
4
by: danthrom | last post by:
Hi, I have a database with four tables. tbl_Client client_alias (PK, text) tbl_Matters matterID (PK, autonumber) matter (text) client_alias (foreign key, tbl_Client)
5
by: Ferasse | last post by:
Hi, I'm an occasional Ms-Access developer, so there is still a lot of stuff that I don't get... Right now, I'm working on a database that stores contractual information. One of the form that...
4
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, I am trying to write a test console app in vb2008 express. Below is the code: Module Module1 Sub Main() Dim frm As New Form1 MsgBox("a test message") 'frm.Visible = True
3
by: davisjr6 | last post by:
I recently converted an Access database built in Access 2000 to the Access 2007 format. Upon doing so, I created a new form that used a table from the old database plus two new tables created in...
0
marktang
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,...
0
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,...
0
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...
1
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...
0
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...
0
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,...
0
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...
0
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 ...
0
muto222
php
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.