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
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

bobsan42

Well-known Member
Joined
Jul 14, 2010
Messages
1,343
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,343
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
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,561
Messages
5,512,071
Members
408,878
Latest member
stams

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top