INTRODUCTION
I have no programming background and have been given a school project on creating an access database.
I have encountered a problem that I was unable to solve even with a week of research!! hoping someone knowledgeable can help me with it so that I can continue to the next phase of my project!
I will be attaching a sample access database to better explain the function that I want and the problem that I'm currently facing!
__________________________________________________ ___________________
TABLE CREATION
The database consist of 2 tables:
(** are the keys for each table)Files.zip
1)Delivery_Order (The orders that consist of 3 fields: Delivery_Order_ID**, Customer_Name, Date_Out)
2)Delivery Order_Products (The items that is in each order that consist of 4 fields: Count_ID**, Delivery_Order_ID, Product_Name, Quantity)
I have linked the field from (Delivery_Order ---Delivery_Order_ID**) to (Delivery Order_Products---Delivery_Order_ID) one to many
__________________________________________________ ___________________
SPLITFORM CREATION
I then created split form for both the tables.
However, when i add the (Form: Delivery Order_Products) as subform into (Form: Delivery_Order), the split form from (Form: Delivery Order_Products) disappeared.
After researching for sometime, i came upon a website that taught me how to manually create a split form using VBA.
Website: https://www.datanumen.com/blogs/how-...ess-using-vba/
With the instructions, i have then manage to create my own database(attached in the post).
If you look at my attached database, there is a total of 3 Forms:
1)Delivery_Order
2)Delivery_Order_Products
3)Delivery_Order_products_Datasheet
(Formelivery_Order_products_Datasheet) has been added into (Form: Delivery_Order_Products) which creates a split form for (Table: Delivery Order_Products)
Click on (Form: Delivery_Order) and you can see that (Form: Delivery_Order_Products) have been added inside.
Which means that there is now a sub splitform inside the main splitform.
__________________________________________________ ___________________
PROBLEM:
Click on attached database (Sample1)
The problem now is that when i select any Delivery Order from the mainform,the Datasheet from the subsplitform does not filter away the rest of the unwanted records.
Click on attached database (Sample2)
I then tried to play around with the functions.
On both (Form: Delivery_Order_Products) & (Form: Delivery_Order_products_Datasheet), (Link Master Field) and (Link Child Fields) is changed to (Delivery_Order_ID)
Now the Datasheet from the subsplitform filters according to the selected delivery order from the mainform.
However, when trying to select on the records for each product, it always bounce back the first record for the selected Delivery Order.
__________________________________________________ ___________________
CONCLUSION:
Apologize for being long winded as ive no background on database and didnt want to miss out any details!
Hopely this is clear enough!
Please help me thanks!