data saving issues (1 Viewer)

Mat1994

Registered User.
Local time
Today, 13:11
Joined
Nov 29, 2018
Messages
94
Hi All,

I've got a problem with my database and I don't know how, why it occured and how to solve the problem. I've attached the database so you can have a look.

I'm working on a airport database. I've been using this forum to answer a lot of my questions as i don't have any training in Access. Thanks a lot. I'm also using Access 2007-2016.
Thanks to your help I thought my database was working ok. I think I normalized the tables correctly and I managed to create my relationship where :
1 airport has many runway, 1 runway as many obstacles, 1 Obstacles has many procedure.

The first problem is in the tables:
- When I try to add a new record, I start with the table tbl_Airport_Info. To make it easier to added all the data concerning that airport, I use the "+" symbol on the left of the record to work my way to the procedure.
After that, I close the table to save the data.
However, when I reopen the table tbl_Airport_info. When I click on the "+" symbole to visualize the data linked to that airport, there is no data. But, when I open the table tbl_Runway, the data is there.
In addition, when I open the table tbl_obstacles, when I click on the "+" symbole. The data linked to one obstacle shows up.

My second and third problems concerns the form :
-When I add a new record in tbl_Airport_Info, if I don't add all the data about the airport, Runway, Obstacle and Procedure. For example, if I only add data about the airport and the runway but not about the obstacle and procedure. Then in the form frm_UserInterface the data won't show.

-In the form frm_UserInterface, when I try to add a new record. The data is saved in the tables. However, when I use the form to visualize the data, the data I added using the form won't show.

I have no idea how and why the database is doing this. So could you help me understand why it does it, and then how to solve the problem.

I've added an example in the database. There are 2 airport (aaaa and bbbb) in the tbl_airport_info. The airport "aaaa" has data about the runway, Obstacles and procedure. The airport "bbbb" has only data about the runway. The airport "aaaa" shows correctly in the form but not the airport "bbbb".
If you try by adding an example, I advice you to just to start with the tbl_airport_info. Start by adding a ICAO (in tbl_airport_info), then a RunwayName and the AirportID (in the tbl_runway). Then the RunewayID and specification (tree does the trick) (in the tbl_Obstcles) and then a SIDCONTRAINTSCODE (can be the number 1) (in the tbl_Procedure).


I hope I explained my problems well enough. I you want more explanations let me know.
Thank you for your help,
Mat
 

Attachments

  • DataBase_V8_WIP - Copy.zip
    1.2 MB · Views: 69

June7

AWF VIP
Local time
Yesterday, 17:11
Joined
Mar 9, 2014
Messages
5,465
Suggest that aircraft should not be in both runways and airports tables.

You have the linking field properties set to ICAO instead of AirportID.

Should use forms for data input, not work directly with tables.
 

Mat1994

Registered User.
Local time
Today, 13:11
Joined
Nov 29, 2018
Messages
94
-you're right for the aircraft. There's no need to have it twice.


-"You have the linking field properties set to ICAO instead of AirportID."
Where did you see that?

-ok
 

June7

AWF VIP
Local time
Yesterday, 17:11
Joined
Mar 9, 2014
Messages
5,465
The linking is set in table design properties.
 

Mat1994

Registered User.
Local time
Today, 13:11
Joined
Nov 29, 2018
Messages
94
You are talking about the "Link child fields" and the "Limk Master fields" in the property sheet of the table tbl_Airport_info?
 

Cronk

Registered User.
Local time
Today, 11:11
Joined
Jul 4, 2013
Messages
2,771
Also take a tip from the start. Do not use multi-valued fields as in AcTypeAirport and AcTypeRunway

While Microsoft dumbed down Access to incorporate multi-valued fields and some other features, any intermediate and advanced developer knows they cause problems down the track.

Also, you don't need AcTypeAirport in tblAirport_info. Rather than the multivalued field tblRunwayAircraft. (See attachment)
 

Attachments

  • Relationships.png
    Relationships.png
    50.5 KB · Views: 52

June7

AWF VIP
Local time
Yesterday, 17:11
Joined
Mar 9, 2014
Messages
5,465
Yes, those properties in table.
 

Mat1994

Registered User.
Local time
Today, 13:11
Joined
Nov 29, 2018
Messages
94
Thanks June, found it. It works now.

Thank Cronk for the feedback, I'll trie it out.
 

Users who are viewing this thread

Top Bottom