A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting the value held in a combobox



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old February 23rd, 2010, 11:27 AM posted to microsoft.public.access
Duncs
external usenet poster
 
Posts: 148
Default Setting the value held in a combobox

I have a form with two unbound combo boxes, and several fields.

The idea of the form is that the user can select either of the two
combo's and the rest of the fields on the form will populate.

So, for example, if the user selects an entry from cboContractAccount,
the table will be searched and the fields populated with the values
associated with that ContractAccount. Alternatively, the user can
select an entry from cboSerialNum--if they don't know the
ContractAccount--and the fields will populate as appropriate.

However what I want to do is, if they select a ContractAccount from
cboContractAccount, I want cboSerialNum to populate with the serial
number for that record, and vice-versa. I've tried using:

.cboContractAccount.Value = ContractAcct

Where ContractAccount is the value retrieved from the database. In
debug mode, ContractAcct shows ''85002312542'
and .cboContractAccount.Value shows ''85002312542'. But, on the form,
cboContractAccount is blank.

Anyone advise?

TIA

Duncs
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.