tough combo box question...

G

Guest

Hi guys:

I have a bit of a conundrum to figure out. I have an invoice form with a
combo box that looks up active only customers (I have it filtered using a
boolean field). However, if a customer becomes inactive and the user wishes
to look up an old invoice, then the customer name cannot be viewed in the
customer combo box field. Can anyone think of a way to allow the user to
view the customer whether or not they are active, however not allow them to
add inactive customers to an invoice.

Many thanks,
David
 
G

Guest

i put a n/a in front of the customer name. then i don't let the combobox
result to a n/a .....
 
B

Bob Howard

I have a similar situation. The way I handle it is to first test whether
the customer is active. If so, let it display as now in a combo box whose
query only selects active customers. If not, I show the result in another
combo box that's right below the first one on the form. This second combo
box is locked and disabled, initially set to visible=no, formats its
contents in "red" and uses a slightly different query --- it selects only
inactive customers. So when I discover the customer is inactive, I handle
the main combo box by locking and disabling it and clearing it out (move a
null value to it) --- this prevents the user from entering anything into it.
I then prepare the second combo box by issuing a requery, and I then make it
visible. Obviously I do the reverse if the customer is active so that
everything returns to "normal."

A slight twist to this is to leave the first combo box enabled and
unlocked --- that would let the user change the customer from an active one
to an inactive one. In my application, I'm not dealing with customers, but
rather accounts. The logic is such that in certain cases I do permit a
change to this field --- to permit a prior posting to an account that's now
closed to be changed (i.e., corrected) to refer to an open account.

Hope this helps.

Bob (@Martureo.Org)
 
B

Bob Howard

Sorry --- in the second paragraph the "twist" would allow changing the
customer from an inactive one to an active one. Obviously! It's been a
long day..... Bob.
 
G

Guest

hey everyone,
thanks for all your answers

Bob- yours seems to be the most suitable one.

Thnaks,
dp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top