Combo Box issue

G

Guest

I have a form with a record source of qClients which is a query of the client
table. I want to be able to have a Combo Box on the form so that when the
user selects the Cleint using the combo box then the other fields associated
with that clientid will update on the form and the Navigation record
indicator will also update to show which record is currently selected.

Currently when I try to make the clientid on the form a combo box and use it
and have all the other fields follow they dont. And the Navigation record
indicator does not follow and after I have used the combo box to select a
clientid then the Navigation buttons freeze.

How can I make it so the form is based on a query and be able to either use
the Naviation Buttons to select the next record and/or use the combo box to
select by the clientid and have the form update itself properly.

Thanks for your help.
 
S

Steve Schapel

Steven,

If you have a combobox on your form, bound to the ClientID field, and
then select an item in the combobox, well then you are just editing the
value of the ClientID field in the current record. Just like if you try
to change the value entered in any other bound control on the form will
simply edit the value of that field in the current record. Except in
the case of the ClientID field, presumably this is a primary key field,
or at least a unique index, so you can't actually change it because then
it would mean that the current record will have the same ClientID as
another existing record. No, to achieve the kind of result you are
seeking, you will need to use an *unbound* combobox to select the client
whose record you want to access, and then use a macro or VBA procedure
to locate the required record. The After Update event property of the
combobox is probably the appropriate place for the macro or code. You
might look up Help for the FindRecord action/method.
 
G

Guest

Steve,

Thank you for you help. After some work I was able to make it work doing
what you said. Your answer also brought to light some concepts that I had not
thought about. I really appreciate your help and especially considering that
my post had been out there a while and most people I dont think understood it.

Thanks again.

Steven
 

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