DLookups

Grettons

New Member
Joined
Sep 22, 2008
Messages
33
Hi,
I need to create a look up for a description field based on which part code is selected.

I've done a Combo box with all of the Part codes listed but I then need to have the description field automatically look up the code and bring through the description.

Many thanks

Grettons
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,855
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
it's in general simple task but now i'm not sure what we are talking about - a userform or a sheet.
where should the description go to - a cell or a textbox?
give some details.
 

Grettons

New Member
Joined
Sep 22, 2008
Messages
33
I need to update the totals of a sub form onto the main user form in Access.

If it was in excel it would be something like =Vlookup(code,TBL_Partslist, 2,0)

"TBL_Partslist" = list of part codes (Column A) and descriptions (Column B)

I'm just not sure how to do lookups in Access and i'm not sure if it complicates things because it's calculating accross forms?

I hope this makes things clearer.

Cheers Grettons
 

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,855
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
isn't the form linked to the partlist table - if it is no lookup is necessary.
or just create a query and put the part code as a filter then display the query result
sorry but it's been a while since i did access and have no code or examples around.
 
Last edited:

sumuwin

New Member
Joined
Sep 8, 2009
Messages
38
Hi

your combo box could have the Descriptions as well - though these do not need to be displayed (set column width to 0).

you could then reference the relevant column e.g.

partno=me.ComboO
description=Me.Combo0.Column(1)



atb
sumuwin
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,446
Messages
5,837,299
Members
430,494
Latest member
abhi_is_yours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top