Hi all,
I have 2 questions:
Q1) I am trying to use the contents of an unbound control on my form to be one of 2 criteria used by a query in a combo box (ComboBoxB). The unbound control gets automaticly filled in after the update of Combo Box A using the following code:[UBPartNumber] = [ComboBoxA]. I want the 2nd Combo Box (ComboBoxB) to have 2 criteria: One is satisfied by prompting the user to [Enter the location where the part will go], but I want the 2nd criteria in the query to be the value of the unbound control 'UBPartNumber' and to be automaticly "looked at" by the query without prompting the user for any further keying. What code will I need to put as criteria in the Part Number field of my query so that it looks at the unbound control for it's data? The ultimate goal here is to Relocate a part from one location to another and determine if that part number pre-exists at the new location so that in the event that it does, the quantity there will be increased by an amount, and if there is not, a new record will be added showing the new part number at that location.
Q2) If the failure of the query to 'get a hit' on "both" criteria brings up no records found, would the 'NotInList' event be able to determine that, so that it will run code to do procedure x? Otherwise, if there is a record found matching both criteria, then I can run some code to do y?
Thanks in advance
chuck
I have 2 questions:
Q1) I am trying to use the contents of an unbound control on my form to be one of 2 criteria used by a query in a combo box (ComboBoxB). The unbound control gets automaticly filled in after the update of Combo Box A using the following code:[UBPartNumber] = [ComboBoxA]. I want the 2nd Combo Box (ComboBoxB) to have 2 criteria: One is satisfied by prompting the user to [Enter the location where the part will go], but I want the 2nd criteria in the query to be the value of the unbound control 'UBPartNumber' and to be automaticly "looked at" by the query without prompting the user for any further keying. What code will I need to put as criteria in the Part Number field of my query so that it looks at the unbound control for it's data? The ultimate goal here is to Relocate a part from one location to another and determine if that part number pre-exists at the new location so that in the event that it does, the quantity there will be increased by an amount, and if there is not, a new record will be added showing the new part number at that location.
Q2) If the failure of the query to 'get a hit' on "both" criteria brings up no records found, would the 'NotInList' event be able to determine that, so that it will run code to do procedure x? Otherwise, if there is a record found matching both criteria, then I can run some code to do y?
Thanks in advance
chuck