Solved im sure I don't need DLookup, but...

ChrisC

Registered User.
Local time
Today, 12:17
Joined
Aug 13, 2019
Messages
90
Hi everyone,

Im 99% sure that I do NOT need DLookup up here, however...

I have a subform that shows results of a query on my form. This query has two fields: WHLocatID and CurrentBalance. Subform is called "InventoryQuerysubformRECEIPT".

I select one of the "WHLocatID" results from a combobox and I want the corresponding "CurrentBalance" to be shown in a separate text box when the combobox is updated.

Question is simple really; what would the VBA/expression be for this to happen?

Many thanks for your help and to all those who have helped over the last few months with my project. This last small hurdle should allow me to complete the project and will make my working life a LOT easier!

Kind regards
Chris
 
Hi Chris. You can include the additional information as another column in your combobox and use the Column() property to display it. For example, the following will display the data from the third column of a Combobox.

=[ComboboxName].[Column](2)
 
Hi DBGuy, many thanks for that!

The combobox is generated from a select query and as you can see in the image, I do happen to have 3 columns. For some reason though I simply cant get that 3rd column to display. if I change the column number to 0 or 1, then the WHLocatID and PartID (as per the query) do indeed show... but when I want to look at the 3rd column, I draw a blank
qry1.JPG


Any thoughts gratefully received!
 
Hi DBGuy, many thanks for that!

The combobox is generated from a select query and as you can see in the image, I do happen to have 3 columns. For some reason though I simply cant get that 3rd column to display. if I change the column number to 0 or 1, then the WHLocatID and PartID (as per the query) do indeed show... but when I want to look at the 3rd column, I draw a blank
View attachment 82766

Any thoughts gratefully received!
Hi. What is in the Column Count property of your Combobox?
 
You have to say how many columns in the control properties?

1591985029077.png
 
ah yes!! of course :)

thank you as ever - for some reason it was showing 2 columns, not 3.

Brilliant help as always!

thanks again

Chris
 
ah yes!! of course :)

thank you as ever - for some reason it was showing 2 columns, not 3.

Brilliant help as always!

thanks again

Chris
Hi Chris. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom