473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What is equivalent to DLookup.... in Access?

I have attached two spreadsheets and a database.

E29 and E31 are dependent on D6 and E27 and I have to update the table (M1:Q60) every year from the tax office. This is for financial 2016.

I want to replicate this in the database.

How do I lookup do it?

Thanks a lot in advance....


E29 has this code....(in the database taxCoefP)

=IF($D$6="NO EXEMPT",VLOOKUP($E$27,$M$7:$O$14,2,TRUE),IF($D$6=" HALF LEVY",VLOOKUP($E$27,$M$18:$O$28,2,TRUE),IF($D$6="F ULL LEVY",VLOOKUP($E$27,$M$32:$O$40,2,TRUE),IF($D$6="2 21D",VLOOKUP($E$27,M44:O44,2,TRUE),IF($D$6="MAXIMU M",VLOOKUP($E$27,#REF!,2,TRUE),0)))))


E31 has this code...(in the database taxCoefA)

=IF($D$6="NO EXEMPT",VLOOKUP($E$27,$M$7:$O$14,3,TRUE),IF($D$6=" HALF LEVY",VLOOKUP($E$27,$M$18:$O$28,3,TRUE),IF($D$6="F ULL LEVY",VLOOKUP($E$27,$M$32:$O$40,3,TRUE),IF($D$6="2 21D",VLOOKUP($E$27,M44:O44,3,TRUE),0))))
Attached Files
File Type: xls blogg.xls (38.0 KB, 178 views)
File Type: xls doe.xls (38.0 KB, 201 views)
File Type: zip testrun.zip (58.0 KB, 67 views)
Dec 26 '16 #1
1 1002
PhilOfWalton
1,430 Expert 1GB
Difficult to help you, as whatever you've got, I'm afraid to say it is not a relational database, and I am unfamiliar with your tax system, so all I can do is suggest some general pointers.

Firstly you need a table Years
Expand|Select|Wrap|Line Numbers
  1. TblYears
  2.     YearID       AutoNumber      Key
  3.     YearName     Text
  4.  
In the UK the current tax year is 2016/17 which is why I suggest text and note that "Year" is a reserved word and should be avoided.

I also suggest you don't use "ID" as the key to a table, something more meaningful like "TaxExemptID" will be much clearer.

So now you change your TblTaxRates and replace iFinancialYear with YearID and iDescription with TaxExemptID. Set up relationships between these 3 tables and enforce referential integrity.

You can then create a query using these 3 tables that will look very similar to your existing TblTaxRates but allows easy sorting and filtering.

Now in the UK tax is worked out on a person has some sort of code and you see how much they are paid in a week and look up in a table they get charged different tax rates depending on their earnings. It appears from your samples that something similar is happening but in your case a coefficient is deducted.

Therefor in your Employee table you need a pointer to the tax band that is applied and I am guessing this will be the TaxExemptID, so again set up a relationship between the Employee's TaxExemptID and the TaxExemptID in the TblTaxExempt.

There may be a complication of the TaxExemptID changing from year to year, but we will deal with that later.

I suspect your TblTaxCalculation should have an EmployeeID in it to link it with your Employee Table (Set up a relationship) and also some form of date or week number. Then you have a complete record of each employee, what they were paid each week / fortnight, and you can re-create the tax calculation.

Let me know howthis sounds

Phil
Dec 26 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: flupke | last post by:
Hi, a lot of applications here a made with access. Tables, forms, reports and the like. Now i rather use Python to do this but i'm not sure how to proceed. I can use wxPython for a gui via...
1
by: pw | last post by:
Hi, Does one exist? Our application is in Access 97 (I would spend the time to get it converted into Access 2003 if it was worth the frustration). A client would like some of his members to be...
5
by: Jack MacDonald | last post by:
This is very strange and disturbing. Last night I opened the FE of my development version of an A97 database and immediately received a Windows-level error message titled "msaccess.exe Application...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
0
by: AJ | last post by:
Hi all, I have the following query which isn't quite finished! 1) How do i specify the '@Country' parameter is optional in an ACCESS stored query? (like MSSQL @Country INT = NULL) 2) What is...
9
code green
by: code green | last post by:
I want to compare two text fields and return records where they differ. But I need to ignore the last 15 characters of the first string. Is there an equivalent to this function in Access ...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm confused about Data Access Layer and Data Object Layer. How are they related? Which layer will be affected when the underlying database structure is changed? Which layer will be affect when...
1
by: nithya jayaraman | last post by:
hi now i am using vb with MS Access ... but i have some information in excel wook sheet , so access that data and store to data grid then find out the average of the sheet 1 and sheet 2 and...
5
by: neelsfer | last post by:
Did anybody else also experienced hassles. MY DLookup()code i use to prevent duplicate entries in 2 different applications stopped working. Quite frustrating to say the least. 2007 Microsoft Office...
1
by: Bowerleeds | last post by:
When I use DLookup (Access 2016) in a form based on table x to transfer field data from table y the data appear correctly on the form but not in table x. The field remains blank in table x. What have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.