A family of Microsoft relational database management systems designed for ease of use.
My mistake, you are right. I wasn't opening it up in the main form.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everyone,
First of all, I am very new to Access and this is my first time working in it. I currently have a database in Excel that I would like to implement in Access.
I am trying to create a customer database that consists of 4 different tables:
I want my primary key, I believe that is the correct term, to be the Customer ID. I would like this to be a calculated field in the "Customer Contact Information" table and it should be manually inputted into the other tables. The "Customer Contact Information" table and the "Customer Profile Form" should have the same exact number of rows since each customer will have only 1 profile. If possible, I would like the Customer ID field to just copy over to the "Customer Profile Form".
The "Customer Order Form" and "Customer Order Content" will have varying rows since each customer could place multiple orders or have multiple items per order. I would like a unique Order Number to be generated in the "Customer Order Form" and the Customer ID, which would be manually inputted, would still be the primary key that ties it back to the "Customer Contact Information" table. Then, in the "Customer Order Content" I would like the Customer ID and Order Number to be manually inputted as well. The Order Number would l link back to the "Customer Order Form" and the Customer ID would still be the primary key.
My goal is to create a form on top of all of this so when customer data needs to be inputted, Customer ID is simply automatically generated and pastes to the appropriate fields in the other tables. The user will ultimately be able to click "New Customer" and then begin inputting all the fields for the "Customer Contact Information", "Customer Profile Form", and "Customer Order Form". Then, the user will have to come back later to input the "Customer Order Content" since everything is purchased based on their preferences. This is where it gets confusing for me since I have to keep all the tables related based on Customer ID, but 2 of the tables will have different numbers of rows.
The problem with the current system is that it gets difficult to share the database and input the data with a few users since there are so many columns and no real interface.
Any help in setting up this database in Access would be greatly appreciated or if anyone has any other suggestions.
Thank you for taking the time to read this.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
My mistake, you are right. I wasn't opening it up in the main form.
It says I must enter a value in the 'CustColorPreference.CustomerID' field.
Which means you have not selected a customer in the combo box. As it stands you'll need to have entered at least one customer in the Customers table first, so you have something to select. You'll also need to close the form and open it again after inserting the row(s) in Customers. In a developed application you'd include a button in the form to add a new customer, as in my NotInList demo, but that functionality is not present in the form as yet.
The way to learn how to do this sort of thing is not to copy by rote from a file like mine, or from some You-Tube presentation, but to follow Richard Feynman's advice in the quote below my signature. Only when you understand the underlying methodology will you be able to transfer that understanding to similar tasks in other contexts. I'd suggest you start with one of the basic tutorials such as Crystal's Access Basics to get a good grounding in how an Access database is put together. My demos are illustrations, not tutorials, and assume a sufficient understanding of the methodologies to be able to transfer what I'm illustrating to other contexts.
I wish I had looked at that tutorial when it was mentioned earlier. I took the past couple of days to look at it in detail and relate it to my current Access database. I definitely feel like I have a stronger understanding now. I've started to normalize more of my data and it turns out, I have a lot more lookup tables than I thought. Is there a general rule of thumb or limit on lookup tables?
I've also manged to sort out the issues I was having with the Subforms. I was able to replicate it with the other lookup tables I had in other forms.
No You create as many lookup tables as you need. Something it may not be worth it. For example, I would not create a lookup table gender. On the other hand I might create (actually, you can problem download one) for US States.
The number of tables is determined by the reality being modelled. A table represents an entity type, so if an entity type exists in that part of the real world being modelled, then there would be a table for it in the database. Where the values of an entity type are immutably fixed in the external world, then you don't need a table. Months of the year or days of the week would be an example, in addition to the genders entity type which Scott mentioned. Even so it can sometimes be advantageous to have a table for such things if it improves the efficiency of the database.
Your reaction of finding you have more tables than expected is not untypical. Inexperienced developers often tend to create fewer tables than required, but with experience we come to realise that many tall skinny tables are better than a few short fat ones.