FAQ for Access

When designing the tables:

Document dates should default to the current date using =date() in the Default Value field.

All foreign keys should have combo boxes. 

Primary keys should have validation rules, but not combo boxes.

For tables with a composite key, the Indexed property for both fields should be Yes (Duplicates OK)

 

When creating relationships:

 

If Access will not allow you to create a relationship, go back and make sure the two fields have the same field type, format and decimal places.  To change the field type if needed, you will have to first delete any relationships that involve that field (click on the relationship line, and click delete).

 

If you draw relationships and they turn out to be 1:1 rather than 1:M as expected, check the Indexed property for the foreign key field.  When creating foreign key fields, you should not mess with the Indexed property.  In particular, some people, in trying to make the properties similar to the corresponding primary key, may set indexed to "yes, no duplicates".  This will result in 1:1 relationships.  If you think about it, for a foreign key field (like Vendor in the Purchase order), you can indeed have duplicate values (more than one Purchase Order per vendor).

When creating forms with a subform:

If you do not see the screen that says "How do you want to view your data?" does not appear, you probably forgot to include the document number in the subform query.  Even though the document number will not be displayed in the subform, it needs to be included in the subform query.

 

If the subform data is not all showing up on the screen, go to the main form in design view and drag down the form footer bar.  Then, make the subform box bigger.  Also, on the subform itself, make sure the detail area is just tall enough to display the field boxes.

When entering data in Forms (i.e. when testing the form):

If you get errors about a duplicate value in the primary key (or similar error message), it probably means that you are taking one of the fields from the incorrect table in the query.  For example, in Purchase Orders, the vendor number should be from the Purchase Orders table, not the Vendors table.

 

If you cannot enter information in the subform, there are a few things to check.  First off, make sure that you have the data coming from the correct tables in the query (i.e. item number comes form the detail table, not the items table).  Next, if you have started working with the access controls (i.e. allow edits, allow deletes, allow additions, data entry) make sure that all of these are set to YES on the subform.  They should only be changed on the main form.

 

When creating reports

 

If you have extra pages, adjust the width of the form area (the part with the squares in the background) so that it is not so wide (just click and drag on the right edge to change the size).