473,763 Members | 5,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MS Access Forms problem

Hi everyone!

I have a forms problem.

Bakground:
I have created a number of tables. Of these, I have a main parent
table (Personal Details) and a number of other child tables (Tax file
No., VISA card no.), etc......

All tables have a primary key of "Name", all child tables forming
foreign key references with the parent table 'Personal Details'. I
have established referential integrity will all relationships. All
relationships are 1-to-1. To solve my problem, I have tried making the
relationships 1-to-many (ie., the 2nd option in the "Link Type" option
of the Relationships window), but it has not worked.

Here's my problem:
I have created a single form with all of these tables' columns in the
form, however, for all of the "Name" fields of all the tables, the
parent table filed is the only one on the form. When the form opens,
it searches the tables for all 1-to-1 relationships (ie. sort of like
an Inner Join of all the tables).

However, if you add, via the form, data for a new record, and for
example, you only populate fileds to fill the parent table "Personal
Details", when the form is closed and re-openned, the new record
information is not returned. It is captured in the parent table, but
as the data for the child tables has not been provided, it doesn't get
pulled on the Inner Join.

Is there a way, such that, I can pull back results in this form of a
LEFT OUTER JOIN nature? - ie., I will pull all rows in the 'Personal
Details' table, regardless of whether a particular row has matching
rows in the child tables........

Any help is VERY much appreciated! This one is giving me
hebe-jebees...

Cheers,
A
Nov 13 '05 #1
2 1789
First of all you need to have a major look at your table structure. 'Name'
is a reserved word in Access and may cause problems later on so it shouldn't
be used as the name of a field, especially a primary key. Using somebody's
name as a primary key is also a no no, what if you get 2 John Doe's or 2
Mary May's. Are you entering both the first and last names in this field or
just the first name.

A primary key is used to make each record unique, that means no duplicates,
so a number is the easiest option to use as a primary key but not always the
best option. The user doesn't need to see the primary key.

For a 1-to-1 relationship the main table needs to have a unique identifier
(primary key) and each linked table have their primary keys with the same
format: (tblMain: PersonID (PK), FName, LName) (tblChild1: PersonID (PK),
Field1, Field2) (tblChild2: PersonID (PK), Field1, Field2) and each PersonID
linked.

For a 1-to-M relationship the main table should have a primary key and each
child table has its own primary key and a separate foreign key usually with
the same name as the primary key of the main table. The main table's primary
key is then linked to the foreign key of the child tables: (tblMain:
PersonID (PK), FName, LName) (tblChild1: ChildID (PK), PersonID (FK),
Field1, Field2).

An Autonumber is the easiest to use for a numeric type primary key but if
you want to use a number other than an Autonumber you'll have to write your
own function to insert the next available number into your record.

With your problem.
How have you created the recordsource for the form? You need to select the
main table and all the child tables and use the join type of "Use all
records from your main table and only those records from your child
tables....". This equates to a LEFT JOIN.

Jeff

"DataB" <ab******@hotma il.com> wrote in message
news:6c******** *************** ***@posting.goo gle.com...
Hi everyone!

I have a forms problem.

Bakground:
I have created a number of tables. Of these, I have a main parent
table (Personal Details) and a number of other child tables (Tax file
No., VISA card no.), etc......

All tables have a primary key of "Name", all child tables forming
foreign key references with the parent table 'Personal Details'. I
have established referential integrity will all relationships. All
relationships are 1-to-1. To solve my problem, I have tried making the
relationships 1-to-many (ie., the 2nd option in the "Link Type" option
of the Relationships window), but it has not worked.

Here's my problem:
I have created a single form with all of these tables' columns in the
form, however, for all of the "Name" fields of all the tables, the
parent table filed is the only one on the form. When the form opens,
it searches the tables for all 1-to-1 relationships (ie. sort of like
an Inner Join of all the tables).

However, if you add, via the form, data for a new record, and for
example, you only populate fileds to fill the parent table "Personal
Details", when the form is closed and re-openned, the new record
information is not returned. It is captured in the parent table, but
as the data for the child tables has not been provided, it doesn't get
pulled on the Inner Join.

Is there a way, such that, I can pull back results in this form of a
LEFT OUTER JOIN nature? - ie., I will pull all rows in the 'Personal
Details' table, regardless of whether a particular row has matching
rows in the child tables........

Any help is VERY much appreciated! This one is giving me
hebe-jebees...

Cheers,
A

Nov 13 '05 #2
Thank you so much Jeff.......

RECORDSOURCE!!! !!! ARRGHHHH! I couldn't find the properties sheet for
the form itself.... it was sending me bonkers........ ..... replacing
the INNER joins with LEFT OUTER joins worked well.........

With respect to the table design......... .. I know, I didn't design
it. One of the first things you learn in Database Systems 1 at Uni is
that a numeric is the best choice for a primary key.....I am just
doing some work on this pig of a thing......... took me a while to
establish normalisation, thus, I am not going to try and convince my
client to change their db structure as well as that would require way
too much impact analysis on downstream systems!

Thanks a lot Jeff,

A
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2413
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which works without any problem in Acc97, 2000 and 2002, but now in Access 2003 there seem to be a problem with this. A user is working with my app, and he uses an Access 2002 MDE in an Access 2003 environment.
1
1722
by: J | last post by:
Hi, Ive got 3 forms, (a subform within a subform within a form) and when I refresh the outermost form, Access closes and offers to send an error report. The forms worked fine a few weeks ago, but now they cause this error in Access 2002 (Access 2000 is fine) Each of the sub forms use values from their parent forms to produce results.
49
14353
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
3
3406
by: Tracey | last post by:
sorry I post this problem again. I have to stop my work to fix the problem. I'm doing a multi form application(Not a MDI one). My startup form say Form1 has a datagrid say datagrid1, when I click a grid item in datagrid1, I wanna show form2. In my code, I achieved that with: Public class Form1 Inherits System.Windows.Forms.Form
6
2570
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns errors. The machine is a new laptop Windows XP Pro SP2 The machine is up to date with respect to the dot net framework. Details: Dot Net Framework ver. 1.0.3705 is installed Dot Net Framework ver. 1.1.4322 is installed
15
2562
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions, modifications and deletions functions very well in the dataset. But impossible to transmit modifications in ACCESS database. Impossible to WRITE in database. Here is the code for data transmission from tableadapter to Access database :
34
2613
by: Mathieu Trentesaux | last post by:
Hello I downloaded Office 2007 for this reason : It seems, once again, that it is impossible to save any modification done in a VBA library, from the main project in Access. The save button remains desperatly grayed. It also seems impossible to open the library in another Access instance
2
2353
by: boyleyc | last post by:
Hi all the following code works perfectly well. Basically it populates a series of check boxes on my form, depending on whether dlookup finds an associated record. The problem i have is that when the date (or xDate) goes over to the next month, dlookup returns NULL even though though there is a record. For example if CALWEEKSTART is 26/11/06 then the loop will check for
11
2578
by: Chad | last post by:
Hi Is it possible to substitute an alternative data source (eg MySQL or SQL Server) into an existing MS-Access application?
6
2421
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The connection string works fine and the tables are added to the project without a problem. When I create the tables they appear to bind and I am able to preview the data in the database in design mode; however, at runtime no data is displayed and the...
0
9564
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9938
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
9823
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...
0
8822
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
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
6643
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
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...
1
3917
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
2
3528
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.