Solved Not able to edit order form

hrdpgajjar

Registered User.
Local time
Today, 12:06
Joined
Sep 24, 2019
Messages
158
Hi all,
I have created a customer order entry system, I have tried to follow an online tutorial and make the attached access order entry system.

Now I need help on,

1. How to create a new customer and enter order items
2. how to edit items in OrderF (it shows an error)



Thanks
 

Attachments

You should consider downloading the new Northwinds Access template. There are two versions. You should probably consider the Starter edition
1734804477073.png
 
Hi all,
I have created a customer order entry system, I have tried to follow an online tutorial and make the attached access order entry system.

Now I need help on,

1. How to create a new customer and enter order items
2. how to edit items in OrderF (it shows an error)



Thanks
Hi
Your CustomerT table has a field called "ID" and is an Autonumerber but you have not set this as the PK?
The "ID" field should be renamed to CustomerID

You should then add a new field named "CustomerID" to the table "OrderT" and this should be a Number data Type - Long Integer.

You should then link the CustomerID Pk from CustomerT to the CustomerID Fk in the "OrderT" and Enforce Referential Integrity.

You can still keep your field named "RegiNo".

Also you should remove all spaces in field names.

You do not need the field "RegiNo" in both the tables "OrderT" & "OrderdetailT".

You do not need the field named "Productname" in "OrderDetailT".
 
Naming FK's by replacing ID with FK or suffixing FK is OK but not necessary
Agree not necessary (as indeed using relevant names is not necessary) but these days, most of my queries I write directly in sql so using PK/FK obviates the need to specify the table name (unless there are multiple child tables) so save typing. Further it tells me which end of a join each field is - not so important for inner joins but much more relevant for left/right joins, subqueries and aliased queries.

At the end of the day, particularly within an access environment, it comes down to personal style since usually the only person reading and needing to understanding it is the author. So long as they can make sense of it months down the line, it doesn't really matter
 
And if there are multiple child tables, can still customize field names so they are unique.
 
Lots of great best practices in the replies in this thread. AGAIN, simply download the Northwind template to see these put into a working file that probably meets your requirements. There is also a fair amount of documentation available on-line.
 
I normalized your tables for you again just like the last time you asked the same questions. Here is a file more like what you are trying to do. Note how the tables are related with PK's and FK's. The Order table is a junction table that brings the customer and product(s) they order together. You can re-do the forms. Please review the relationships window so you can see how a relational system works. I also attach the last file I fixed for you. I would probably combine the two systems into one, but that is up to you.
 

Attachments

I normalized your tables for you again just like the last time you asked the same questions. Here is a file more like what you are trying to do. Note how the tables are related with PK's and FK's. The Order table is a junction table that brings the customer and product(s) they order together. You can re-do the forms. Please review the relationships window so you can see how a relational system works. I also attach the last file I fixed for you. I would probably combine the two systems into one, but that is up to you.
Thanks Larry you are a life saver.
 

Users who are viewing this thread

Back
Top Bottom