Creating Simple Relational Database Example Step by Step (1 Viewer)

jaryszek

Registered User.
Local time
Yesterday, 23:13
Joined
Aug 25, 2016
Messages
756
Hello Guys,

I have sample database in attachment. I am learning to thing in relational way in Access. Can you help me please?

I want to simplify my database from here:

https://www.access-programmers.co.uk/forums/showthread.php?t=293988

in order to understand step by step how to do things in Access in details.

Step 1

I have 2 tables:

1) EmployeeDocuments: Id Primary, DocumentName, DocumentID
2) Employees: Id_Primary, Person, JobPart

Relationships:
one to many (Employees.ID Primary as unique key and EmployeeDocuments.DocumentID is many relationships) ---> one Employee can have few different documents attached to him.

Thanks to it i can create simple Form (Form 1)

https://ibb.co/fdVkf5

where i can input data for each Employee (Job Part, Person are only one, but can be a lot of documents ).

Step 2 - first problem

I want to display on my form (Form 1) for each Person to have a datasheet view where people can input MANUALLY names of documents (these documents are similar and only some of them are the same).

So i would like to create a form on EmployeeDocuments table in order to prepare datasheetview, how to do it ?
I can quess that i should use combobox and bound it with person name?

Please People - help,
best Wishes,
Jacek
 

Attachments

  • example databaseV2.mdb
    704 KB · Views: 81

apr pillai

AWF VIP
Local time
Today, 11:43
Joined
Jan 20, 2005
Messages
735
Search for 'Database Design Basics' in the Help Documents of Microsoft Access and go through the topics, you will know what to do.
 

jaryszek

Registered User.
Local time
Yesterday, 23:13
Joined
Aug 25, 2016
Messages
756
Yeeeah I did it! Of course i was not using this help documentation - I have not found it - all microsoft trainings are very general. Here we need the details.

Step 2 - solution (i know that a lot of people have problem with that - maybe this will help them)

I created MainForm where I have data from my QueryMain. After that i created second query which contains DocumentName ID_Primary and DocumentID.
I put in as subform in my MainForm and bind forms (with wizard) automatically using Primary_ID - awesome!

Step 3 - Adding Money and Time Value - the hardest Part.

Goal: Add table DocumentsMoney with MonthDate and Money for each document for specific date ranges choosen by user.

Steps:
1. Adding table with Primary Key DocumentsMoney.DocumentID and relate it to Employee Documents.Id_Primary (left join)
2. Next is the hardest part where i want to your help please:
How to add to user possibility to add for each month (from 1-2017 to 6-2017 as default or from range of dates) in easy simply way sums of money?

for example User choose John1.
And in user subfrom will be possibilty to write date and money manually :

https://ibb.co/dxaaXk

But problem is that i would like as default have for all documents 6 records here:
all for each month:
a) user can choose text box range of dates (for example from 02.2013 to 06.2015) and all records should be seen in form where user can in easily way input data manually (id dont know it is possible to show for example 10 months within choosen date range on main form?)
b) if user will not choose tex box range of dates default values (from 01.01.2017 to 01.06.2017 should be displayed).

I dont know if it is possible doing quries? Or have i use VBA to achive this effect?

Please help

Warm regards,
Jacek
 

Attachments

  • example databaseV2.mdb
    852 KB · Views: 82
Last edited:

jaryszek

Registered User.
Local time
Yesterday, 23:13
Joined
Aug 25, 2016
Messages
756
Hello Guys,

did you have similar problem ? Input multiple values for date range?

Jacek
 

Users who are viewing this thread

Top Bottom