Microsoft Access
--
Questions
--
Followers
Top Experts
I have just read for days and have tried to set my tables up the best I can with the knowledge I have collected. I have a main table for all the product called ParentProductTable . I then in that ParentProductTable table have 4 fields for each ProductVariantSKU . Like I said this is just what I have read. Wrong or right Who knows. Â i read that I needed to set it up like a Customer Order table with a Order Product Table. So I assumed I needed a ProductVariantTypesTable wich I made and I now have to link it back to the fields in my main table.
This is where i am lost.
1: Is this a self joining or what?
2: How do I set it up so that when a customer orders a variant that i can input the correct variant and MS Access get the correct Variant of NSOP NSSP USOP USSP?
3: Is my tables EVEN set up correctly???
I know I could just make every variant a record but that would Quadruple (4X) the amount of Information in the Database causing severe redundancy and performance problems. I have attached several photos in hoping they can help you HELP ME PLEASE! I thank you all for your time and advice!





Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ProductID_, Number, Long Integer, DefaultValue = Null (nothing -- delete 0 if Access adds it)
this also solves the problem of blahblahProductAvailable and the variant SKUs (I have code I can share with you to Loop and combine values from related Records).Inventory will be on the "variant" sku and able to be rolled up to the master sku when desired.
Rather than ProductImage1, ProductImage2, ..., create a related table for ProductImages with ProductID as a foreign Key.
each piece of information should be stored atomically with no repeating values.
Locations should also have LocID as an AtuoNumber and then LocID as a Long Integer foreign key in other tables. Â When key fields represent the same piece of information in different tables, for ease of understanding, name them the same.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
>Â "images -- store them in a cloud"
that is fine. Â Just store one URL on each record so all URLs are in the same field. Instead of 12 fields for URLs, you would have 12 records. Â This is better for many reasons.
Images could be linked to SKU or Parent SKU. If SKU, then parent SKU should show them all too and vice-verse.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Use Number, Long Integer, Default Value is nothing, for the Foreign Key
Don't link on LocationName.
Create an AutoNumber field in that table and use a Long Integer in related tables.
don't link one autonumber to another -- that is not a valid relationship because autonumbers will never match except by chance






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
In addition to what I said,
The Relationship between OrderProductTable and ParentProductTable is incorrect. Â OrderLineID is an autonumber and the PK for the OrderProductTable. Â Change ProductParentSKU to ProductID and connect on the two ProductID fields or as I suggested, you should be connecting the order directory to the InventoryLocationTable since THAT is what you are ordering.
InventoryLocationTable also needs to replace ProductParentSKU with ProdductID and join on the ProductID fields.
I don't see any reason to have the InventoryLocationMasterLis
When you post the picture of the schema, please expand all the tables so we can see all the columns.
Also, now that you are switching to surrogate keys, you MUST add unique indexes on all natural keys.
You asked about whether to use natural or surrogate keys, Â in general it is better to use surrogate keys because they will keep you from having to use multi-field primary keys on lower level table. Â However, since it makes no sense to allow duplicate values for ProductParentSKU, you must make a unique index on the field since you are no longer using it as your primary key. Â Same for ProductVariantSKU. Â Customer is more of a problem since FN/LN isn't guaranteed to be unique. Â For the customer table, you need to add either address or phone number and make a compound unique index. Â Having duplicates in the customer table won't cause the same kind of problems that duplicates in ParentProduct but the duplicates will prevent accurate reporting.
or as I suggested, you should be connecting the order directory to the InventoryLocationTable since THAT is what you are ordering.
Are you saying to directly connect the OrderProductTable and the InventoryLocationTable together????
I have done everything up to your last post and did away with the InventoryMasterListTable Â

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I didn't notice that you had the whole address mushed into CustomerAddress. Â It is best to split this into Addr1, Addr2, City, State, and Zip for easier formatting and reporting.
The Address in customerOrderTable is ShippingAddress, not customer address. Â Frequently they are the same and so when the order is entered, generally the billing address is copied from the customer table to the order table where it can be changed if the order is being shipped to a different address.
You seem to have given ConditionCode a surrogate key. Â That means that you MUST replace ConditionCode in ALL the other tables with the surrogate key field named ProductVariantCodeID.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
You also never said whether the images relate directly to the product or to the VariantSKU.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Don't use the lookup wizard in desktop databases
I'll let Pat continue to help since I am currently working on something else. You are making progress!
Pat -- I suggested a self-join for variant SKU and parent SKU. Then image could relate to either ...






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
To create a compound unique index, open the index dialog. Â Type a name for the index in the Index Name column. Â Choose the first field from the dropdown in Field Name. Â et the Unique property to Yes. Â On the next line, leave the Index name blank to indicate that this field belongs to the previous index and choose the second field. Â You can have up to 10 fields in a unique index or primary key.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
In looking at your image, I see you are calling this ProductParentSKU and have it as short text. Â Firstly, it needs to link to the Primary Key field and therefore, needs to be Long Integer with no Default Value (delete what Access puts there).
Putting _ after a PK fieldname is my personal convention for identifying a parent

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
File, Options, Object Designers --> DELETE EVERYTHING listed in the box for AutoIndex on Import/Create (ID, Num, Code, etc)
I would say Yes
A SKU is a SKU. Some SKUs can roll up to others. Â The information you track about each is the same, isn't it?
In a query, you can add the SAME table more than one time ... 2 times in this case
The SKUs are all very similar for the variants. Parent SKU is 11 alphanumeric String and the Children Variants SKUs are the 11 alphanumeric String with NSOP NSSP USOP USSP Suffixed on the end
Example
Parent SKU: BBZ3VPH4DMC
NSOP SKU: BBZ3VPH4DMCNSOP
NSSP SKU: BBZ3VPH4DMCNSSP
USOP SKU: BBZ3VPH4DMCUSOP
USSP SKU: BBZ3VPH4DMCUSSP






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
ProductID_, Long Integer, Default Value is nothing
to the Products table
this will be to identify the parent SKU for the variants
better to set it sooner than later ...

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
good!
Now remove ProductParentSKU
I also like to put key fields at the top.
1. select row by clicking on the row selector box to the left
2. let go of the mouse
3. click on that box again and drag it up so the dark line indicating where it will go is under ProductID






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
4. and then let go of the mouse
the field will move
click the Save icon (diskette) twice so it will save and save the new order when you look at the datasheet.
do you have data in there yet? Better to get at least some sample records in first

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
drag another copy of the Products table to the diagram ... and please rename this table so it is simply called "Products" -- no need to add all those extra words to its name
Drag from ProductID in the copy to ProductID_ in the first Products table
Enforce Referential Integrity and click OK
Then:
I like to position the parent above the real table and only show a few rows.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Position all tables on the diagram so the "1" side of the line is on the left and the "many" side of the line is on the right ... so the diagram flows from left-right as data must be entered. Â This is very helpful to see the overall flow of the information.
so InventoryLocationsTable (just call this Locations) is to the left of OrderProductTable (just call this Orders).
the foreign key in Orders to link to ProductID should be CALLED ProductID since it represents the same piece of information -- rename it.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
you can make a better one now :)
>Â "How do you rename it the the alias."
no need -- it will have a _1 on the end -- that is ok and your clue that it is just a copy of the same table ... or, what are you asking?
You should have a different table for Suppliers with a SupplierID autonumber PK (primary key). ProductSuppliers should have SupplierID as a foreign key and ProductID as a foreign key.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
drag another copy of the Products table to the diagram ... and please rename this table so it is simply called "Products" -- no need to add all those extra words to its name Ok I think I have done all that you have said so far.
rename what is now Orders since I see it is order detail to OrderDetail or OrderProducts
rename CustomerOrderTable to Orders
rename CustomerTable to Customers and move it to the left of Orders
It should not be linked to ProductID

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Now that I am looking at fields in locations, I see ProductID and how much is there ... so that is actually ProductLocations with pk = ProdLocID and you need a different Locations table with LocID and LocName. Â Sorry if I am changing what I said before -- you know your data better than I do
you will run out of room for one screen of the Relationships Diagram faster with all these long names!






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Drag from ProductID in Products_1 to ProductID_ in the Products
Enforce Referential Integrity and click OK
Then:
I like to position the parent (Products_1) above the real table and only show a few rows.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
right now, Products is in the first column of the diagram. Move it and everything to the right of it to the right so Products is in the 3rd column.
ProductSuppliers will be in the second column with a link on ProdSupID to Products (rename SupplierReferenceID in Products and move it under ProductID_) . Â Actually though, cannot a product have more than one supplier? Perhaps this information needs to be in yet another related table.
So suppliers would be in the first column, linking to ProductSuppliers on SupplierID (which needs to be added to ProductSuppliers)
Make ALL the fieldlists narrower  -- and shorten them -- so there is not extra space






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Â
since you don't yet have a form for entering, look at the ProductID for a parent SKU when you are entering a variant and put that number into ProductID_
1: Am I supposed to make a NEW record line for each variant in the Products Table?
I would think No on the quadruple records???? But what do I know?...
2: Will I need a new table for the ParentProductSKUs AKA ProductIDs to hold my 11 length alphanumeric Parent SKUs and 15 length alphanumeric Children Variant SKUs  with a Relationship between the ProductID in the Product Table and the SKU Table if I need one?
3: Also can you give me a run down of how the process flow works in this setup. As in Customer orders, order detail, inventory pick, ship item ETC.... Just something so I can visualize this specific system better.
4: Do I need to Link the Location Table to the LocMasterLst Table?
5: Then do I link the locations Table to Orders or OrderDetails Table or another Table?
I am more of a hands on or watching a video kinda person to make things click better for me. Once it clicks it CLICKS and I can move on. Here is the Relationships view I have now and the Products Table in Datasheet View.
Thank You!







EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
2. no -- that is the point of putting Product_ into the table as well. Â It will hold the ProductID for the parent sku
3. the reason I suggested you arrange the relationships so "1" is on the left and "many" on the right is to better visualize the flow of information. Â Here is a short video on relationships you can watch:
video Tip: Enforce Referential Integrity on Access Relationships (cc) closed-caption
http://www.youtube.com/watch?v=_zxxc9jzWEg
4. Â I did not notice when I told you to rename Locations that it should actually be ProdLocations with ProdLoc autonumber primary key.
ProdLocations should have a field, LocID, that is a foreign key (long integer, no default value) that links to LocID in what should be the Locations table that is now called, I guess, LocMasterLst
5. OrderDetails will probably need a link to ProdLocations
the more you can abbreviate, Prod for Product, Loc for Location, etc, the less space your tables will need on the relationships diagram.
I am not going to be able to help today because I am working on another project. I will look in on what you've done tonight though. It could be late -- about the same time I got back on last night. Re-read the notes I made yesterday, realizing that I was also changing names from what I previously told you to call things based on seeing the information better. Rather than giving you conflicting information, since we have different styles, Pat wants me to continue to help you. So today, it would be best for you to assimilate what has been done and get better understanding. Â I also linked you to a short book you should read. Â You are doing very well!
SlimLine it for Speed
Custom Solutions For Me
Be able to Export CSV files (or other formats maybe) in certain ways
Overall just make things move more fluid like and Automize  things.
#1 is for me to learn it so when the next hurdle comes along I can say "Yep I'm On It!" Problem solved.
I will share in the next few few parts below some Images of some CSV file layouts I am needing and had previously  accomplished with Queries. I export out of Access into my own website and I also export out of Access into other websites.
 I am not 100% customizable on our own website yet so I can only import a CSV file a certain way and other websites I have no say so on the CSV file layout.

The Query coding I came up with below is obviously for the database before I met you wonderful people :) and we just overhauled and changed everything. So I will have to recode it to work now.
OUR WEBSITE:
SELECT ParentProductTable.ProductParentSKU, [ProductParentSKU] & "NSOP" AS ProductVariantSKU, ParentProductTable.ProductNameTitle, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.NSOPQuantityAvailable, ParentProductTable.NSOPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12
FROM ParentProductTable
UNION
SELECT ParentProductTable.ProductParentSKU, [ProductParentSKU] & "NSSP" AS ProductVariantSKU, ParentProductTable.ProductNameTitle, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.NSSPQuantityAvailable, ParentProductTable.NSSPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12
FROM ParentProductTable
UNION
SELECT ParentProductTable.ProductParentSKU, [ProductParentSKU] & "USOP" AS ProductVariantSKU, ParentProductTable.ProductNameTitle, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.USOPQuantityAvailable, ParentProductTable.USOPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12
FROM ParentProductTable
UNION
SELECT ParentProductTable.ProductParentSKU, [ProductParentSKU] & "USSP" AS ProductVariantSKU, ParentProductTable.ProductNameTitle, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.USSPQuantityAvailable, ParentProductTable.USSPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12
FROM ParentProductTable;
OTHER WEBSITES:
SELECT "NSOP " & [ProductNameTitle] AS ProductVariantNameTitle, [ProductParentSKU] & "NSOP" AS ProductVariantSKU, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.NSOPQuantityAvailable, ParentProductTable.NSOPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12, ParentProductTable.ProductParentSKU
FROM ParentProductTable
UNION
SELECT "NSSP " & [ProductNameTitle] AS ProductVariantNameTitle, [ProductParentSKU] & "NSSP" AS ProductVariantSKU, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.NSSPQuantityAvailable, ParentProductTable.NSSPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12, ParentProductTable.ProductParentSKU
FROM ParentProductTable
UNION
SELECT "USOP " & [ProductNameTitle] AS ProductVariantNameTitle, [ProductParentSKU] & "USOP" AS ProductVariantSKU, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.USOPQuantityAvailable, ParentProductTable.USOPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12, ParentProductTable.ProductParentSKU
FROM ParentProductTable
UNION
SELECT "USSP " & [ProductNameTitle] AS ProductVariantNameTitle, [ProductParentSKU] & "USSP" AS ProductVariantSKU, ParentProductTable.Manufacture, ParentProductTable.MPN, ParentProductTable.UPC, ParentProductTable.ProductDescription, ParentProductTable.USSPQuantityAvailable, ParentProductTable.USSPSellPrice, ParentProductTable.ProductImageURL1, ParentProductTable.ProductImageURL2, ParentProductTable.ProductImageURL3, ParentProductTable.ProductImageURL4, ParentProductTable.ProductImageURL5, ParentProductTable.ProductImageURL6, ParentProductTable.ProductImageURL7, ParentProductTable.ProductImageURL8, ParentProductTable.ProductImageURL9, ParentProductTable.ProductImageURL10, ParentProductTable.ProductImageURL11, ParentProductTable.ProductImageURL12, ParentProductTable.ProductParentSKU
FROM ParentProductTable;
On our website a single webpage has the ParentProductInfo including title description and so on. Then we have a table with the condition code variant code and the pricing and quantity. Other websites say that every individual product condition has to have a single webpage so I have to duplicate the items 4 times. (I believe like you are suggesting.)
This is just my personal uneducated thought!---- I have been trying to avoid duplicating records 4 or 5 times. (One for Each Condition OR One for Each Condition and the Parent)
I thought this would causing Database bloating and slow the system down and cause Redundancy as in the titles being similiar. Also When entering information as the user I would have to create them four lines of record for each and this would take ALOT of work and time.
 I know there is a way to pass on info to duplicate fields (I believe this is called looping) and combining fields for the titles to have the condition code in it. You even said something about this at the beginning about looping and combining code.  I just don't know anything about that yet.
Like i said this is just to help you help me and let you know the end expected results. I will take whatever help I can get and not be pushy because I understand and I need the help. :) Beggars can't be choosers as they say! I cant thank you enough! I have been using the old database software and it is costing me to much time and frustration. Sometimes it even deletes stuff on me after I exit.(the current Software I have NOT Access). So this is HUGE and very important to me. God Bless!

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
For other topics, you will need to ask another question.
Size all fieldlists so all fields shows and there is not extra space on the right or below
Products (and the table above) should move to column 2 so that ProductSuppliers is in column 3, since a ProductID must be known before it can be used in that table (so a Product record needs to be created first). Â ProductImages, Customers, and Locations can them be placed in the same column.
ProductLocations needs LocID (which should move up, under ProductID) linked to Locations. Â ProductID should go to Products. Â OrderLineID should be deleted.
In OrderDetails, ProdLocID should move up under ProductID. Â It is a good idea to put key fields at the top.
Adjust fieldlists left or right so that "1" doesn't look like "11" on the diagram (ie the line between Products and ProductImages)
ProdVarSKU does not need to be in ProdLocations since it has ProductID
Make sure that no foreign keys have a default value of 0 (zero) in the table design (Access automatically does that!) -- you will need to delete this wherever you find it.
Also make sure the PK matches the tablename -- ie: if you want OrderLineID than call the table OrderLines. Details was just a suggestion.
>Â "the biggest thing that is throwing me off is the record for each condition"
don't know what you mean






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
ie:
1: NSOP Yellow Bus Toy
2: NSSP Â Yellow Bus Toy
3: USOP Yellow Bus Toy
4: USSP Yellow Bus Toy
What kind of things might be different? color? size? what else?
_______
delete link from Locations to ProdLocations and create correct relationship on LocID
Conditions:
NSOP = New Original Packaging (Brand New)
NSSP = New Our Packaging (New Repackaged)
USOP = Used Original Packaging (Used with original packaging shows signs of use.)
USSP = Used Our Packaging (Used repackaged shows signs of use.)
That is it. Not Like Shirts and hats that may have different colors and sizes.
OK THEIR ARE TWO SIDES OF ME! LOL!!! NOT REALLY JUST TWO SEPARATE THOUGHTS OF PLAN!
Let me know what you think about this.
Plan1: I think Queries would be the best thing for the conditions. I need the Tables set up Like they are supposed to and then use Queries to  SELECT and Combine the information I need into a specific single Datasheet view. Which I can then use to import into our website and other peoples websites. I was thinking Tables like : ProductTable ProductVariantSKUTable ProductPriceTable ProductConditionCodeTable and then use Queries to Combine the chopped up info.....
Plan2: Â Setup like you are telling me with the each Record for each SKU (Which is Just ParentSKU plus NSOP NSSP USOP USSP suffixed). Then Use Queries to create a form for simplifying the process for inserting information into multiple lines of record at once.
In Plan 2 I can see some ups for history keeping and Reports later of what kind or condition of product we sell more.
My only thing is I am afraid that the database will become sluggish after 10,000 -50,000 records that are duplicated into 40,000 -200,000 and that the user would have to enter info manually into several areas multiple times. Â I already have 4,000 items in our current situation and if I was to transfer this into access with a record for each condition that would be 16,000 items.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Products, ProductVariants, Prices, ConditionCodes with CondCodeID autonumber PK then CondCodeID Long Integer foreign key would be in ProductVariants
in ConditionCodes there would also be CondCode short text,size=4 with a unique index.
>Â "Setup like you are telling me with the each Record for each SKU (Which is Just ParentSKU plus NSOP NSSP USOP USSP suffixed). Then Use Queries to create a form for simplifying the process for inserting information into multiple lines of record at once."
well perhaps not -- the SKU would then have 2 controls on the form, one for the SKU and another for the condition
in ConditionCodes there would also be CondCode short text,size=4 with a unique index.
CondCode I Chose Indexed Yes No duplicates...Correct?
well perhaps not -- the SKU would then have 2 controls on the form, one for the SKU and another for the condition
What do you mean by 2 controls on the form. There is only one spot. Subform Seperate Controls or coding for 2 controls into the single space for Control?
In Prices Table would make a field called Price OR 4 fields one for each price condition NSOPPrice, NSSPPrice,USOPPrice, USSPPrice.
In ConditionCodes I made 4 records NSOP NSSP USOP USSP 1 2 3 4
this is what I have so far:
yes. Â To indicate a field has a unique index, I generally move it above the PK in the order so it is apparent when you look at the Relationships diagram
>Â "What do you mean by 2 controls on the form. There is only one spot. Subform Seperate Controls or coding for 2 controls into the single space for Control?"
didn't you make the form? Another control can be added for the condition. Â While you may combine it for reporting, it is actually 2 pieces of information: an sku and a condition
>Â "In Prices Table would make a field called Price OR 4 fields one for each price condition NSOPPrice, NSSPPrice,USOPPrice, USSPPrice."
and here is where it gets tricky and why I suggested to put the variants into the Product table ... under no circumstances should you put price in 4 places unless they are different prices (retail, cost, etc)
If you do it this way, then a variant will not have information duplicated that can be found for the parent sku.
If WILL have ConditionID.*
* "ConditionCodes" --> Conditions
perhaps "Conditions" is a better word with autonumber ConditionID as the PK.
code is an extra word that need only be used for the text field to describe the condition
when designing database structure, there is a lot of back-and-forth ... trying things to see if they look right and fit with the logic






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
didn't you make the form?Yes i apoligize I was thinking Control Source not a Control like a textbox or so on...
under no circumstances should you put price in 4 places unless they are different prices (retail, cost, etc)
The prices will be different.
IE:
NSOP: 29.95
NSSP: 24.50
USOP: 17.50
USSP: 12.50
do you ever sell a product withOUT a condition? or do they always have something specified?

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
What that is currently in the Products table relates directly to the parent product and what relates to the variant product?
I am sorry I don't get what you are talking about.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I thought your parent SKU was actually a product but it turns out that it is only a product when combined with a condition
100% Correct!
so the 2 tables would be separate and yes, that means the relationship and ProductID_ field get deleted, in that order.
So I delete the relationship between tables Products and Products_1.
Deleteded ProductID_ field from the Products Table and I can remove the Products_1 table from my relationships display correct?
Ok so I now have changed Products Table to SKUs Table and Changed the field ProductsID to SkuID. I Have added a Products Table with Fields ProductID as the PK, SkuID, ConditionID, Price.
In the other tables (ProdLocations, ProductImages, ProductSuppliers, Order Details) Field  that were linked to the Products table that is now known as the SKUs Table. Do I change the Linked fields to SkusID and keep them linked or will they be linked to the new Products table field ProductsID
ProductID has no 's' -- each record is just one product. Â I see you took 'name the ID field like the table' literally ... I just meant to keep the idea the same ;)
on the existing relationships to SKUs: you will need to decide when the foreign key is ProductID (in which case, it goes to Products) or is renamed to SkuID.
I don't think Prices need to be a separate table unless you have pricing structures.
I am going to be away for awhile -- do what you can on your own.
Products replaces ProductVariants (which I didn't like the name of anyway).
Psshhh Whatever LOL...Im not creative just simplicity get it done kinda person. You can call anything whatever you like as long I understand the operation and it works! Thank you!
I see you took 'name the ID field and table' literally ... I just meant to keep the idea the same ;)
Once I follow exact directions and understand I can run from there. :)
on the existing relationships to SKUs: you will need to decide when the foreign key is ProductID (in which case, it goes to Products) or is renamed to SkuID.
I'm lost on that. What do you mean. Example?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
on the existing relationships to SKUs: you will need to decide when the foreign key is ProductID (in which case, it goes to Products) or is renamed to SkuID.
Ok so say we order new ones from a supplier and used ones from somewhere else. Then I would link the SKUs Table to the ProductSuppliers Table and Rename the field.
vs
If we order all conditions from a supplier no matter the condition. I would link the Products table with the ProductSuppliers Table
Ok I will share with you a screen shot of the current software database I am using.
We are currently only able to store a product (or a single Product Condition) in one single area. Yes that is great for organization but sometimes you need to store items in 2 areas. You can see the inventory list at the bottom. There is condition, Location, Total Quantity, Available Quantity, Sell Price, Purchase Price, Restock point.
We track it like this. We print out a label and on that label is the product ParentSKU and the Condition Code. We place the label with the product item and then store it in a inventory location. The customer orders and we find out the inventory location from the PrimaryParentSKU. We take the PrimaryParentSKU and search for it in the database that we have and look at the bottom. Location ....for condition.... and then go find that inventory location. Then look for the product with the matching  label.
Remember, with a ProductID, the SKU can always be looked up. Â I would imagine the main thing you need SKU for is rolling up for management reports
On barcoding: it is really easy to have Access print those for you too since the barcode printer is just another device and a barcode just another font.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
If you put both ProductID and SkuID in the ProdSuppliers table, you would only want the user to fill out one or the other on each record.
OrderDetails : since you said you don't have products without conditions then it would also use ProductID. Â In comboboxes to enter, the SKU and Condition Code can be concatenated to pick from a list of ProductID






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
you should have a table for Manufacturers with ManufID autonumber primary key
>Â "how to insert info"
you would create forms for maintaining information in each of the tables
>Â "where to put the main ParentSKU"
you would have a table and form for the SKU table -- and you need to rename fields in there
on the Orders form, there would be a combobox for picking a ProductID, which is what would be stored. Â Behind the scenes, the RowSource for the combo would be a query or SQL statements based on the Product, Â Sku, and conditions tables.
0: ProductID
1: SKUs.Sku & "-" & Conditions.CondCode   'if you separate with dash
columns indexes start with 0.
ColumnWidths: 0;1.5 'or whatever width is best to show Sku and condition code -- cm: 0;4cm
ListWidth: 1.7 Â 'sum of column widths + 0.2" to allow for scrollbar -- or add 0.5cm
did you read my Access Basics book? It is short (100 pages) with lots of pictures :)
The Forms i totally get. Its just that sometimes things don't click well for me or I overthink them or something.
> "where to put the main ParentSKU"
you would have a table and form for the SKU table
Is this a new table or the SKUs Table that we have already?
I did read over some of the book not all of it. I try my very best to fit alot of stuff in and thank you very much. I did watch your videos and they were really good. I usually have to see things or hands on experience to understand things. Alot of stuff reading is not enough. I thank you very much for your time and patience. And with this mess you have great patience for sure.
you already have a table for SKUs
remember to keep "1" on the left and "many" on the right when you position tables on the relationships diagram -- not many people besides me will tell you to do this ... but I am an engineer so I like things to be as logical as they possibly can. You can see the data flow much better.
I see you have a field called LocNotes. Â Be sure this is Short Text and not Long Text as Long Text fields should be handled differently. Â
Now to size ... Access defaults Short Text to 255. Personally, I change the default to 50. Â It is important to consider how much you want to allow users to enter. Â For instance, you wouldn't want address lines to be that long or they would not fit on a label. Â For names, I allow 75 for company name and 50 for first or last name (which is still a bit long but some people have really long names).
For optimizing size: put sample data in all your tables. Â Make it as long as you think it will be. Download and run this:
free Analyzer for Microsoft Access
http://analyzer.codeplex.com
Look at the Deep Analysis report to see the maximum length for characters used.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
remember to keep "1" on the left and "many" on the right when you position tables on the relationships diagram -- not many people besides me will tell you to do this ... but I am an engineer so I like things to be as logical as they possibly can. You can see the data flow much better.
Good Eye! I was all like but I did and then I seen it LOL!
I see you have a field called LocNotes. Â Be sure this is Short Text and not Long Text as Long Text fields should be handled differently. Â
Honestly don't know if I even need it. But if so it is short text.
OK you said long text is handled differently. In the SKUs The ProdDescr might be longer as it is a product description as in product specifications. Info that goes to all the conditions.
will get some data in and run that.
once you have run the Analyzer, create a query with this SQL:
SELECT T.Tbl, F.Fld, F.DefVal, F.DbID
FROM a_Tbls AS T INNER JOIN a_Flds AS F ON T.TID = F.TID
WHERE ( (F.Fld Like "*ID") AND (F.DefVal="0") AND (F.DbID=DMax("DbID","a_DBs
ORDER BY T.Tbl;
It will tell you where you have forgotten to delete the Default Value of 0 (zero) in your foreign key fields for the analysis you just did.
... and Locations is still linking to the wrong field in ProdLocations
ProdLocations does not need ConditCode -- this can be known from ProductID
I see DateCreated in your SKUs table ... I have code I can give you when this is done to add tracking fields to all your tables (ie: dtmAdd for date/time added and dtmEdit for date/time edited -- dtmEdit will then be updated by forms)
In OrderDetails, rename SellPrice to PriceSell since another report the Analyzer can give you is an alphabetical list of all the fields in your database -- that way Price and PriceSell will sort next to each other. Â I also like to name date fields starting with dt for the same reason (OrderDate -dtOrder) ... or dtm if time is also important.
you have Quantity in both ProdLocations and OrderDetails. Â It is a good idea to name fields such that the only duplicated names are key fields. Â Perhaps Qty for OrderDetails and QtyLoc , QtyAvail in ProdLocations.
unique indexes:
just like CondCode is a unique index in Conditions, some of the other tables should also have unique indexes such as Manufacturers (ManuName --be consistent. If you are using Nm for name, use it everywhere), Â SKUs (you should have a field in there called SKU), Locations (LocName -- again, be consistent), Suppliers, (SuppNm), etc.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
don't know what you mean
>Â Also I ran the analyzer? Now what?
great!
"Look at the Deep Analysis report to see the maximum length for characters used."
There are 2 numbers after Data Type (ShTxt, Lng, etc) for each text (short and long) field. Â The first is how long it is defined to be, the second is the maximum number of characters you actually used -- this can help with sizing. Â I generally round up for fields that don't have a set length for values. Â
You can right-click on an Access report while you are looking at it (Print Preview) and choose Export >Â PDF. Â Then you can attach that file so I can better see what you have.
re-read my last message -- I made a lot of comments there ...edited it after you probably read it. There is a lot to consider and do.
SELECT T.Tbl, F.Fld, F.DefVal, F.DbID
FROM a_Tbls AS T INNER JOIN a_Flds AS F ON T.TID = F.TID
WHERE ( (F.Fld Like "*ID") AND (F.DefVal="0") AND (F.DbID=DMax("DbID","a_DBs")) )
ORDER BY T.Tbl;
Blank report I assume I did good LOL!

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
awesome! By the way, the correct term is Datasheet since this is a query not a report.
>When inserting info. I inserted the price in the products table but in the ordersdetail table it was blank 0.00
as it would be. Â On a form, once you choose a product from a combobox, code can automatically fill the price that can then be over-ridden by the user
when you compact/repair the database, which you should only do after you have backed it up, the ~tables should go away.
>Â "I couldnt find the print to PDF"
right-click on a report while you are looking at it in Print Preview (the view that the Analyzer uses). Â From the shortcut menu, choose Export and then PDF.
you should figure out how to do this.
btw, when you open the Analyzer again, it will open to a blank record. Â there is a find combobox at the top of the form to pull up a previous analysis.
__________________________
I realize you prefer messages to be short with only a few instructions ... however I do not want to repeat what I wrote in the long message (starting with '255 characters goes a long way' ) before you got back on, so please go re-read it and do/consider everything.
remember when you create a Unique Index on a field to move it up in the order do it is obvious when you look at the Relationships Diagram ... this is another thing I will recommend that you probably won't hear from others. Â Although I did not specifically suggest this, I hope by now you are catching on to 'my' good practice (since I am the one currently helping you).
On Order date -- only use dtmOrder if you do care about time -- I see you did this (as well as other suggestions -- great!).  If only order date is important for reporting, only use dt.  The  reason this is important is because date/time DOES also record time so if only date is important, stripping time needs to be done.
I still see "Prod" fields in the SKUs table.
In OrderDetails-- don't move OrderID, ProductID, and ProdLocID above the Pk -- keep them below. Â Only move fields above when they have a unique index. Â Again, this is just something I do to help keep things straight that I am passing on to you.
the Manufacturers table needs to be dragged (you can drag tables from Navigation Pane) back onto the diagram. Â If you rename tables when the diagram is not open, they disappear (the relationships do not)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
... and I see the Manufacturers table is not gone. Â
Still "Prod" fields in the SKUs table -- they need to be renamed or moved.
Set unique indexes and adjust order of those fields above PK. Â
btw, if you want to see all the indexes on a table, click the lightening bolt icon when you are looking at table design... there are probably way more indexes than you want or need. Â Access automatically creates indexes for you based on what you name fields. Â You can (and should) stop that from happening ( Â covered in my Access Basics book in the Normalization or Relationships chapter -- hope you read both of those thoroughly and if not, do so).
You have a few tables that collect address/email/phone/websit
... as you have probably discovered, I tend to edit my previous comment as opposed to making a new post until I can't since you respond  -- so even after you write another message, refresh the page to see if I added anything else ;)
I see places where you copied fields. Â CustAdd1, for instance. Â I also see that you did not completely populate tables with sample data -- a task for tomorrow. Â When you fill sample data, put a value in every field including foreign keys*. Â Once you do this, run the Analyzer again.
*It helps to change the  Document Window Options to Overlapping Windows so you can see more than one thing at a time.  File > Options > Current Database > Document Window Options - Overlapping Windows
Zip should be Short Text even though its values are numbers since you won't do math on it (get an average, a sum, etc). Also some zips start with "0" and using Number for data type means you would need a format code to show this.
Nice that you have filled filed Description for some of the fields ... if you don't have any more to say, at least copy the field name to the description. Â This, btw, will be Status Bar Text (what is displayed in the lower left) for each control when you create forms ... so users will see it unless you change it for that control on the form. Â For PK fields, I generally just put the fieldname there. Â Realize that when you copy structure to create a new table or fields, the description should change too. Â (ie: ProdSuppID says Product Supplier Unique Identification Number -- this means nothing to users but, by now, this should be descriptive stuff that you don't need either -- just put fieldname there again as it is probably NOT the unique identification number used for tracking by your company for the supplier and could be misinterpreted)

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
So to the unique indexed fields only go above the primary key or all ID fields?
I do care about time because that can help clear the air if some errors occur.
I have done everything but completed the reading of the two chapters. Working on that now. Here is the Analyzer report and screen shot

You DO need to create indexes on fields that are not part of a defined key or relationship but on which you want to search/filter. Â CompNm would be an example of a field you might choose to index.
Earlier when you posted a picture of some indexes, there were several dups that should be deleted. Â And the index that I recommended that you create was incorrect. Â The unique index you create to enforce business rules should NEVER include the table's surrogate key. Â That defeats the purpose and will allow you to add logical duplicates.
For example.  You create a State table and someone convinces you that you should use a surrogate key so you add an autonumber ID and that is the field that will participate in all relationships.  However, state code still must be unique so you would add a unique index on the state code to ensure that no one enters a second record for CT by accident.  The StateID for CT is 7.  If you make the unique index on StateID AND StateCD, you will be  able to add a new record with an ID of 51 and a StateCD of CT because the combination of 51+CT is different from 7+CT.  That is why the index to enforce the business rule that StateCD must be unique must only include StateCD.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
On using FK for states, however, I believe it is better to store since 2 character state abbreviation (in the US anyway) since space is the same for 2 characters or Long Integer and it does help to see the natural information in an address.
Dustin, the hidden relationships that Pat mentioned are shown on the Analyzer reports -- so, as long as you create a relationships with referential integrity (a real relationship), the only indexes you usually need to additionally define will be for unique indexes. Delete the rest of the visible indexes (except PrimaryKey) since they are just clutter -- and often repeats of something else Access already creates.
Looking good!
you mean indexes? Click on the lightening bolt icon in table design on the Design ribbon tab -- this will open the Indexes window. Â You will see row(s) for indexes that are defined. Â There should be PrimaryKey and whatever unique indexes you have created. Â Other rows, at this point anyway, are duplicates of something else already defined (often PrimaryKey is duplicated and called something different). Â That is why I had you modify defaults to NOT create additional indexes since by default, if Access sees "ID", "Num", "Code", or "Key" in a fieldname, it will make an index.
Down the road, you may choose to add other indexes for fields that are used for searching that are not already indexed.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
oh, and something I didn't mention that I hope you did not do : do not make that any field Required in the table design. Â This is best handled by forms.
Perhaps it is time to close this question and gather your thoughts for the next one ;) ~






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.















