Issue regarding database design and corresponding operations in forms (1 Viewer)

Thomasso

New member
Local time
Today, 14:36
Joined
Nov 27, 2016
Messages
2
Hello everyone,

I am building a database for a B2B company. That means that it has special requirements:
  • There are many products from multiple suppliers
  • Each piece has its own serial number which needs to be stored as a unique value for future operations (calibration, servicing, etc.)
  • We don’t know if a piece will be initially stored within an order or a delivery (because one can come sooner than the other and it differs, for example we order products based on customer’s order but sometimes we order something just to have it in case someone orders it)

The idea is that when a new piece occurs, it will need to be put into evidence… For example:
Product with serial number 12345 is type: Samsung Galaxy S6 (user will do this through a simple „Add to evidence“ form)
After that, this specific piece will be in evidence and I can either assign it to an order (and set its selling price – remember, it’s B2B and it’s not static) or to a delivery (and set its buying price).

I want to have a „Add a new order“ form, where I will specify a customer, date, etc., and a „Order Details“ subform, where I will type the serial number and it will fill the other fields (the ones already specified, the rest will remain blank – for example when I am creating a delivery, nothing will happen to the selling price because it might not be known yet).

Very important thing is that when I have the main form, it is in the add mode (blank fields and set to create a new record). The problem I am currently having is that the subform is acting like this as well, meaning that when I select the serial number, it says that it cannot be added because of a duplicate value that should be unique (it is not a primary key though).

The error message is: You cannot add or change a record because a related record is required in table SUPPLIERS.

I am not sure what exactly this means. It shows when I click out of the record. This is the thing I am trying to resolve at the moment.

Attached are some pictures in zip file which explain my database model in depth. I translated the important stuff in English for you guys.


I would be happy to receive any feedback, since this is my first database ever. Is the design correct? Why is it showing the error message? Any other ideas to improve the model, forms, relationships, etc?

Thank you in advance!
Tomas
 

Thomasso

New member
Local time
Today, 14:36
Joined
Nov 27, 2016
Messages
2
Great advice, thank you. Database is working now. :banghead:
 

Users who are viewing this thread

Top Bottom