Hey all,
Fairly new to Access (2010) and VBA so bare with me
I am creating a database for an equipment list relevant to specific projects. I have created all the forms etc and all I have left to do is for the user to be able to open the equipment list specific to the project that they have selected.
This is what I've envisioned:
- User selects project number from main menu
- will link to form with all project details
- Click "equipment list" button and will open up the equipment list form
- User can enter data, and display all equipment data in listbox in this form
- User needs to enter equipment data for a different project - goes back to main menu and selects other project number and then clicks "equipment List for that project"
- Now I want this form to only be specific to that project ID
So each Project has its own information - kind of hard to explain.
I have scoured the net and I presume i should use the OpenArgs property to pass the value of the project ID from the projects for to the equipment form. Someone said to have a hidden textbox on the equipment form that has the foreign key bound and use the forms OnLoad event to execute the value of the OpenArgs property.
That bit really confuses me and I can't manage to write the code for the OpenArgs property. Will someone be able to help me out with writing a sample code for this procedure?
Please see attached photo of my relationships etc.
Thanks very much!
Fairly new to Access (2010) and VBA so bare with me
I am creating a database for an equipment list relevant to specific projects. I have created all the forms etc and all I have left to do is for the user to be able to open the equipment list specific to the project that they have selected.
This is what I've envisioned:
- User selects project number from main menu
- will link to form with all project details
- Click "equipment list" button and will open up the equipment list form
- User can enter data, and display all equipment data in listbox in this form
- User needs to enter equipment data for a different project - goes back to main menu and selects other project number and then clicks "equipment List for that project"
- Now I want this form to only be specific to that project ID
So each Project has its own information - kind of hard to explain.
I have scoured the net and I presume i should use the OpenArgs property to pass the value of the project ID from the projects for to the equipment form. Someone said to have a hidden textbox on the equipment form that has the foreign key bound and use the forms OnLoad event to execute the value of the OpenArgs property.
That bit really confuses me and I can't manage to write the code for the OpenArgs property. Will someone be able to help me out with writing a sample code for this procedure?
Please see attached photo of my relationships etc.
Thanks very much!