Form ComboBox Drop Down Not Populating Retaling Fields With Data

MBM

Registered User.
Local time
Today, 13:13
Joined
Sep 27, 2010
Messages
31
I have added three fields from a table into a form. Invoice Number which is a combo box drop down, item & cost. When selecting an invoice number from the drop down the item & cost fields don't populate with the relating data from the table. I have tried setting the field controls but get errors. Am I going about this the right way or do I need to use a look up or query?
 
As Paul said, your post is short on information! You have to remember that the file is in front of you and you know your intentions, here. But we don't have that advantage.

If your intention is to pull the Item and Cost into a record on this form and then add other data to the record, the link Paul gave you should get you straight.

If your intention is to use the Combobox to retrieve the actual record that holds this data, the Combobox Wizard, using the third option, "Find a record on my form based on the value I selected in my Combo Box," will do that for you. Before it can do this, though, actually before the third option is even shown as being available, the form has to be based on the table this data comes from.

Linq ;0)>
 
As Paul said, your post is short on information! You have to remember that the file is in front of you and you know your intentions, here. But we don't have that advantage.

If your intention is to use the Combobox to retrieve the actual record that holds this data, the Combobox Wizard, using the third option, "Find a record on my form based on the value I selected in my Combo Box," will do that for you. Before it can do this, though, actually before the third option is even shown as being available, the form has to be based on the table this data comes from.

Linq ;0)>

Yes that's what I want to do!

I have three fields in a form from the Customer Invoices table. Invoice, Description, Cost

Using the combo box wizard I add :

Invoice Number from the Customer Invoices table
sort ascending invoice number
store the value in this field Invoice Number

I can select the Invoice number from the combo drop down but the description and cost fields don't change.

I have created & deleted the form several times, not sure if that has anything to do with it not working as it should?!??!

Control Source for Description is Description
Control Source for Cost is Cost
 
Figured it out. I couldn't see the :

Find a record on my form based on the value I selected in my combo box

option because the record source in the form property sheet was not set to the table.
 
Another problem. I've added a field (quantity) to the form from another table (order details) however the description and cost fields no longer populate from the Invoice Number combo but as soon as I remove the quantity field they populate.
 
By adding a Field from another Table you're now basing your Form on a Query and many Queries are Read-Only, hence Forms based on them are Read-Only.

Here's an article from Allen Browne about why Queries are Read-Only with some workarounds:

http://allenbrowne.com/ser-61.html

If a Form is Read-Only it cannot be edited and Access considers what you are doing with the Combobox to be editing!

One workaround would be to populate a Field in your record by using the DLookup() function to pull the data from the second Table.

Linq ;0)>
 
I want to manually enter data into the Quantity field, so I can calculate totals by multiplying the cost by the quantity.
 

Users who are viewing this thread

Back
Top Bottom