Hi All!
I have a few forms in an application I am working on that have a ComboBox that allows users to select from a list of customers. Now, if a user is unable to find the customer they are looking for, there is a button they can click that opens an "Advanced Search" form where they can search any part of a customer name (i.e. search "ABC" for "ABC Corp."
. What I would like to be able to do is, once a user has found the customer they are looking for in the advanced search, assign the combobox on the "Source Form" to the customer name they have selected.
My thought process on this is to have a global variable:
Global AdvSourceForm as Form
that is assigned when a user clicks the "Advanced Search" button. Then, once the user has selected a customer name from the "Advanced Search" form, there would be a Sub Function that updated the Customer combobox on the source form with something like:
Forms!AdvSourceForm.cmbCustomer.Value = [CustomerID]
My problem is assigning the value to Global AdvSourceForm. I tried using:
AdvSourceForm = Me.Name (from source form)
This gives me a "Invalid use of property" compile error.
If anyone understands what it is that I'm trying to do and has any helpful advice, I would greatly appreciate the help.
Thanks!
Nate
I have a few forms in an application I am working on that have a ComboBox that allows users to select from a list of customers. Now, if a user is unable to find the customer they are looking for, there is a button they can click that opens an "Advanced Search" form where they can search any part of a customer name (i.e. search "ABC" for "ABC Corp."
My thought process on this is to have a global variable:
Global AdvSourceForm as Form
that is assigned when a user clicks the "Advanced Search" button. Then, once the user has selected a customer name from the "Advanced Search" form, there would be a Sub Function that updated the Customer combobox on the source form with something like:
Forms!AdvSourceForm.cmbCustomer.Value = [CustomerID]
My problem is assigning the value to Global AdvSourceForm. I tried using:
AdvSourceForm = Me.Name (from source form)
This gives me a "Invalid use of property" compile error.
If anyone understands what it is that I'm trying to do and has any helpful advice, I would greatly appreciate the help.
Thanks!
Nate