Hi guys,
I've been looking for a way to pass parameters into a form and then use that parameter in the subform once it's been passed. The situation is this - I have a few tables in the current database who's contents I'd like to display. I also have a main form with a command button. The idea is, once the button is clicked, a subform is opened that populates its text and list boxes with information from a particular table, depending on what value was passed in as a parameter (ie: DoComd.OpenForm <subformname>, OpenArgs:="First_Table" will open First_Table, DoCmd.OpenForm <subformname>, OpenArgs:="Second_Table" will open Second_Table etc. etc....)
My question is pretty general - how is this done?
The DoComd... OpenArgs example is something I found earlier but I've no idea how to get the subform to act based on the parameter that was passed into it.
Hope you can help,
Thanks




Reply With Quote