I'm stuck...
What I'm trying to do in Access is have a combo-box that gets its values from a Customer table, and if the user chooses to enter a Customer name that isn't already in the other table, then I want to open up another form for Customer maintenance.
My plan of attack is this:
I have the combo box working beautifully.
I'm thinking about some VBA code on the "On Exit" event of the combo box-
Something that'll let me do something like this
(pardon my wretched pseudocode!):
IF ComboBox.Customer IS NOT NULL AND
NOT CAN-FIND(ComboBox.Customer IN customer table)
then DoCmd.OpenForm(customer form)
Problem is, I don't know how to do the CAN-FIND part (and I know it's not a VBA command anyway).
Is there a way to use DoCmd.RunSQL to do somethign like this?
Thanks in advance,
Mark Pruett
What I'm trying to do in Access is have a combo-box that gets its values from a Customer table, and if the user chooses to enter a Customer name that isn't already in the other table, then I want to open up another form for Customer maintenance.
My plan of attack is this:
I have the combo box working beautifully.
I'm thinking about some VBA code on the "On Exit" event of the combo box-
Something that'll let me do something like this
(pardon my wretched pseudocode!):
IF ComboBox.Customer IS NOT NULL AND
NOT CAN-FIND(ComboBox.Customer IN customer table)
then DoCmd.OpenForm(customer form)
Problem is, I don't know how to do the CAN-FIND part (and I know it's not a VBA command anyway).
Is there a way to use DoCmd.RunSQL to do somethign like this?
Thanks in advance,
Mark Pruett