combo box question #2

  • Thread starter Thread starter clueless2003
  • Start date Start date
C

clueless2003

Guest
My combo box is not working precisely as I had intended. I need for the user to be able to input a value (in the combo box field) and have the rest of the fields automatically populate based on that input. For some reason, this only works sometimes . Am I missing something here, or is it possible I don't want to be using the combo box at all?

I'll be more specific. These are the fields:

Account # <------------------This is the only input I want
Description (of account)
Object account
Subsidiary
Subledger
Company
Location
Account # (in "old" system)
Description (of "old" account)
Natural account

So, after the user inputs "Account #", the other fields populate. Ultimately this table will be made up of a few thousand lines of data--all pulling from the same table.

Is the combo box the correct approach? And, if so, why might I be having the problems I'm having?
 
Using a combo to select a value then referencing the columns in the other controls is a standard way of displaying the related data. How are you currently 'populating' your other controls.

ps if the thread is relevant to a previous one, post it on the same thread so that we can see the previous problems / answers as they will help our response, rather than a new topic.
 
Fizzio,

Perhaps your question about how I'm populating the other controls exposes the (seeming) flaw in my form.

All of the data resides in one rather large table. I designed the form via the wizard and then added the combo box. My thinking was that when the user input the data in that one field (account #), Access would populate the other fields with the related data from the table.

Is there something else I need to do with the other fields and/or the combo box?
 
What are you trying to get the combo to do?

It seems that you added the combo retrospectively. I suspect that you are duplicating data but shoot me down if this is not the case.

If you are using a combo to select the account# (I am assuming here that you are storing that value somewhere else) you do not need to store the rest of the data, only the ID associated with that account#

You then display the other values by pulling info from the combo.

eg if your combo has AccountID;Account#;AccountName;AccountLimit etc...

you would (as Mile-O has already answered) column widths as 0;;0;0

in the textboxes on the form. set the controlsource to 'lookup' the value in the combo ie
for the accountname control
=Forms!NameofForm!NameofCombo.column(2) etc

any clearer?
 
Last edited:
Okay, if I'm understanding you correctly, I need to input a variant of this (=Forms!NameofForm!NameofCombo.column(2) etc) for the Control Source of each field. Am I correct?

For some odd reason, when I'm inputting the account number in the combo box that # and the associated data is not showing up in the form! For example, I'll type in account # 111111 and the form will display account #222222 and that account's associated data. WTF?
 
I think Doss has given you the answer.
 

Users who are viewing this thread

Back
Top Bottom