Help With DLookup - Not Working

Feb 25, 2005

I have a "status update" subform on a form that the user can go in and put periodic updates for that record. I have one field on the subform called UpdateStatus that I want it to get its value from the current value on the main form (which changes periodically) called SDPPhase so that you can see the status at the time of the update and have a history.

I am trying to do this using DLookup with the following code in the UpdateStatus field:
=DLookUp("SDPPhase","BRD","BRD_Id = " & [BRD Id])

BRD is the main form's table and BRD_Id is on both forms and what links the subform.

The problem I am having is that although when I step through it...it picks up the correct BRD Id, the output is ALWAYS the value for the very first record in the BRD table...not the one for the BRD_Id on the current form.

I also tried putting the code in the form properties for the subform but that doesn't work either.
Any help would be GREATLY appreciated!!

View Replies


ADVERTISEMENT

Dlookup Not Working

Jul 7, 2006

I am using Dlookup to look up LastName, I have

AssignBy = DLookup("[LastName]", Employees, "POC =" & Me.Combo22)

I am getting an ERROR ""You entered an invalid argument in a domain aggregate function"

I need AssignBy = LastName from Employees Table where POC=what is selected in Form for Combo22.

ex. POC=3 go to Employees Table find POC that equals 3 and get the LastName.

Please Help!!

Jessie

View 2 Replies View Related

Queries :: DLookup Not Working With Certain Dates

Aug 30, 2014

Can't figure out why dlookup will not work for me in a query for certain dates?

Simple example to highlight the problem:

Table1 -

Read_Date----Read_Value
31/07/14-------10
01/08/14-------20
03/08/14-------30
20/08/14-------40

Query based on this table with the following calculated field:

Expr1: DLookUp("[Read_value]","Table1","Read_Date=#" &[Read_Date]& "#")

Query output -

Read_Date-----Expr1
31/07/14--------10
01/08/14
03/08/14
20/08/14--------40

Will not return a value for 01/08/14 or 03/08/14 (dd/mm/yy)

If you try it with many dates its skips several and I cannot see a pattern.

View 7 Replies View Related

Forms :: DLookup Not Working In Subform - Keep Getting Error

Apr 23, 2014

I have a subform that has the Expense Code from the Expense Codes Table and I want to look up the Description (yes I know its not correctly spelled in the formula but it is in the table)

=DLookUp("Expense Discription","Expense Codes","Expense Code=" & [ExpCombo])

But I keep getting "error" returned

I have double checked spelling field names etc...

View 6 Replies View Related

Autofill Field Based On Value From Table Using DLookup Not Working

Jan 8, 2013

I am new to Access (using Access 2012) and All I am trying to achieve is to autofill the field [Frequency] from Table FullList based on the value of [Frequency] from Table Courses using a DLookup code used to update the FullList form. The code is not updating anything! It is frustrating! Frequency is a number (integer) and while Course is a text. The figures of my Access database are below.

View 2 Replies View Related

Modules & VBA :: Return Single Value From Table And Assign It To String - DLookup Not Working

Sep 3, 2014

I am trying to return a single value from a table and assign it to a string to be used later but Dlookup isnt working at all. below is the code im using and the error message im recieving is "wrong number of arguements or invalid property assignment"

Code:
Sub boo()
Dim result As Integer
result = dlookup("Definition", "Config", "Parameter = 'Mail Folder'")
End Sub

View 13 Replies View Related

Modules & VBA :: DLookup Multiple Criteria Not Working - Column Is A Numeric Field

Feb 25, 2015

I have a small problem with dlookup multiple criteria. Vba code looks like this:

Code:

Label34.Caption = DLookup("[Spent_Hours]", "249_1_CHours", "[Date_Added]= " & Me.Text27 & " And [Shift] = '" & Me.Text29 & "'")

This gives following error:

Syntax error in number in query expression '[Date_Added]=4.02.2015 And [Shift] = '2'.

[Shift] column is a numeric field.

View 14 Replies View Related

Program Working In Access 2007 Not Working In Access 2010 Due To Missing OCX File

Dec 27, 2014

I have a program that runs under access 2007 that I use at my work. We will soon be updating to MS office 2010 and the program will not work now because a calender file .ocx was removed from access 2010. Is there a way to get the 2007 .ocx file to work in access 2010?The program I am using is a relatively simple stand-alone and unsupported app that we use to request patient arrival and departure from various radiology tests inside a hospital. No reports are made from the app other than the number of patient transports for the day.

The app is placed on a common drive accessed from any pc in the hospital. No special permissions are required. But our app does use the calendar, time and date functions in access 2007. When I tried the app on a pc with access 2010, it basically says it (access) cannot open the app because a .ocx file is not present.Is there a way to make the access 2010 calendar file work in access 2007?

View 1 Replies View Related

Duplicate Record Command Button Not Working For One Form But Is Working For Other Form

Jan 15, 2015

I have an Access 2010 database with two tables and two forms. The tables are Organizations and People. Similarly, the forms are Organizations Entry Form and PeopleEntryForm. The People are linked to the Organizations table. Several people can be linked to the same organization.On my Organizations EntryForm, I created a command button to duplicate a record using the wizard. It works fine.

I did exactly the same thing on the PeopleEntryForm, but instead of copying the record, it creates a new blank record. I don't get any error messages. Is my problem due to the fact that the People table is linked to the Organizations table?

View 13 Replies View Related

DLookup Not Right

May 2, 2005

Can anyone see where I've gone wrong. The purpose should be if the value in the query is 0 or less (a minus amount) and the order number and part number matches the order number and part number on the form then a warning should appear. It's not picking up the record for flagging when it should:

If (DLookup("OutstandingQty", "qryremaininginvoiceamount", "OutstandingQty <= 0" & " And [OrdNo] = " _
& Me.[OrdNo] & " And [InvPtID] = " & Me.InvPtID)) Then

View 6 Replies View Related

Dlookup's

May 19, 2006

Hi,

I am pretty new to Ms Access.

I have a table which has a list of trades (Builder, Carpenter, Painter etc) going down the side and going across the top I have the number of employees (1Emp, 2Emp, 3Emp). The values in the table show the charge for that number of employees for that trade.

I have a form which has three combobox's that show the Number of Manual Employees, Number of Clerical Employees and the number of working directors and a combo box that shows the trade. What I want to happen is when the user clicks a command button on the form the charge for the total number of employees for that trade is shown in a txt box.

I have the following code attached to my button:

Private Sub GetValue_Click ()
Dim TotalEmployees As Integer

TotalEmployees = [NoManual] + [NoClerical] + [NoWorkingDir]

Value = Dlookup(TotalEmployees & "Emp", "ValueTable", "[Business] = Forms![Form1]![Business]")

End Sub.
When I type "[3Emp]" in the Dlookup it will work fine and finds the charge for that trade. But when I pass it the Result from the addition and concatenate it with "Emp" it doesn't seem to work.

I originally thought it was because I declared the TotalEmployees as an Integer by I also tried declaring it as a string - to no avail.
I just can not figure out why it will not look up the TotalEmployees.

I would much appreciate any help on this on any suggest as to how I can get the values from my table.

Charlene

View 1 Replies View Related

How Do I Use DLookup???

Jul 7, 2006

I am using Dlookup to look up LastName, I have

AssignBy = DLookup("[LastName]", Employees, "POC =" & Me.Combo22)

I am getting an ERROR ""You entered an invalid argument in a domain aggregate function"

I need AssignBy = LastName from Employees Table where POC=what is selected in Form for Combo22.

ex. POC=3 go to Employees Table find POC that equals 3 and get the LastName.

Please Help!!

Jessie

View 4 Replies View Related

DLookup

Mar 26, 2007

Please help prevent my laptop from being smashed against a wall numerous times and then being thrown out the window, after all, the wall is mostly innocent in this situation.


I have read post upon post and other dim references to DLookup in the Access Help file, etc. I am generally a bright guy (although inexperienced in DataBases, VBA and some forms of lovemaking) but I have not been able to figure out the DLookup function. Could you please give me a VERY simple explination of how to use this function and it's expressions?

If it will help, we can use the following senario...

Table_Special_Needs
Special_Need_ID
Special_Need (Data Includes: Initiatives, High Ropes, etc.)
Standard_Price

Table_Event
Event_ID
Initiatives
High_Ropes
Extra_Linens

I would like to be able to add a price field for each item in the Event table and have the table lookup the price from the Special Needs table.

Many thanks for any help you can give.

t
:confused:

View 2 Replies View Related

Dlookup ?

Oct 19, 2007

I would like to know if i am doing an Inventory in an Invoice Program and i want the [quantity] from a subform on the Orders Form to be deleted automatically from a Products Table , Would the Dlookup Function Help and if yes how would i implement it ?

Regards Dups

View 2 Replies View Related

Dlookup

Feb 18, 2008

Dear all,

Firstly, thank you all for allowing me into your group!

Secondly however, PLEASE HELP!

I've created a database for storing students details and exam records for my university department, and everthing is fine except for one final problem: In order to allow final grades to be calculated all student marks have to be stored numerically, but each number corresponds to a code: eg N=0, G2=1, G1=2 .... A1=22

I'm trying to get the student marks report to display not just the numeric code, but also the final code eg, C2. To do so I've been trying to use DLookup as follows:

Expr1: =DLookUp("[Grade Code]","Lookup Table","[Score]= Forms![Total Grade]")

where "Grade Code" is a field in the Lookup Table (ie, it lists the A1, A2), "Lookup Table" is a table listing all the numbers and their corresponding codes, "Score" is the numeric score in the "Lookup Table" table, and "Total Grade" is a calculated (Numeric) field in the open report (though created in an accompanying query). I just can't get it to work however!! When I run the report, the column is just blank, and nothing I do seems to be able to get the corresponding code (Eg, B1, B2) to appear on the report!

Please help me if you can, I'm not kidding when I say my job is on the line with getting this database to work! Once I've got this sorted, all I need to do is find a way of letting the secretaries input the alphanumeric code, but the database automatically stores that as a number. I figured however, that sorting the first problem will go some way to finding out how to sort the 2nd one!

Thank you all just for being out there!

View 3 Replies View Related

Dlookup

Oct 12, 2007

Do the Access functions dlookup, etc. cause performance issues when using remote SQL servers where the data is held?

View 2 Replies View Related

DLOOKUP Help

Nov 17, 2007

Dear all,
How are you?
I need your help.
Can you help me in this DLOOKUP function.
I want to retreive "covered period" from financial statement table where investment id = the value of investment ID from Financial statement form.
This is the syntax:
x: DLookUp("[PeriodCovered]","Financial Statements","[InvestmentID] = " & Forms!Investments!InvestmentID)

Kidly,find attached the DB.

Thanks in advance.

View 5 Replies View Related

Dlookup

Nov 21, 2007

Hi,

I am trying to use a dlookup to return the price of an item that meets two criteria. This is what I came up with, but it doesn't work. The part after the AND works by itself, but when I combine the two I either get a #Error or no values that meet the criteria.

Any suggestions? I can provide more info if needed.

Expr3: DLookUp("[Crt plan price]/1000","CPC List","[Plant] = ' " IIf(IsNumeric(Right([Date Code],2)),"Unk",Right([Date Code],2)) ' " And [Material] = " & [Item])

Thanks!

View 2 Replies View Related

DLookup Help

Feb 16, 2008

Hi all

I am trying to set a criteria in a DLookup and I don’t know if it’s possible. I’ve managed to get a result using the following code in a form but it only matches an exact date.

strValue = DLookup("Price", "Price List", "ServiceItemID = " & "ServiceItemID" & " and CStr([ContractStartDate]) ='" & CStr([Date]) & "'").

What I really need is to be able to do a between criteria on the [Date] field and check out whether that fits between [ContractStartDate] and [ContractEndDate] and then return the Price according to the [Date].

I actually want to run it as a query but have no idea how to do this. So, can a "between criteria" be put into a DLookup? and can it all be put into a select query? If so how? If not, what better way it acheive the desired outcome?:confused:

Thanks

View 14 Replies View Related

Help Using DLookup

Apr 8, 2005

I need to fix my form (ie survey) so that a user can only scroll through the current page and not to another record using the mouse scroll button.

I'm having trouble using the Dlookup function.

Please help

View 5 Replies View Related

Dlookup

Jun 2, 2005

I've got a dlookup problem, i'm working on an adp recreating from an mdb. I've got a main form called contract_sessons and then a sub form called session_contracts and a sub form in that called consessions. In the consessions this holds ths dates for each session what i'm trying to do is lookup the period for the date in the table called dates. The current code I'm using in an unbound field is =DLookUp("[Period]","[dates]","[date]=Forms![Contract_Sessions].Form![Session_Contracts].Form![conSessions].Form![Date]") but all that appears is #error.

Anyone help

View 2 Replies View Related

DLookup Again

Jul 6, 2005

I know there are lots of questions relating to this function but I ahve searched and cannot find an answer. Can I add a Dlookup to a field that calculates a sum of the fields based on todays date? I am not very good a coding so any help welcome. I guess I am asking if Dlookup can be combined with Sum and Date()

View 2 Replies View Related

Dlookup

Jul 7, 2005

Question:
I have two unrelated tables
Table 1 :
Name
Phone
Email
Table 2 :
Contains a number of fields but the mains fields I'm referencing are :
Requestor
Requestor Phone
Requestor Email

Form is based on the second table: I want to able to chose a requestor and have Requestor Phone and Email Populate based on the info from first table.
Please help, I hope this is not a stupid question.
http://www.elysiumlightproductions.com/image-files/requestor.jpg

View 5 Replies View Related

Dlookup

Aug 17, 2005

I'm not familiar with using dlookup and I'm having some problems.

I have a form with a project number. the project number relates back to a table that has organizations and project number -the table name is Project
I need the organization name to appear on the form. The where clause of the Dlookup is where I'm stumpped

DLookUp("[Organization]","Project"," ???? ")

Thanks

View 1 Replies View Related

Dlookup Help

Jun 15, 2006

I've been reading and reading all previous posts and have yet to find anything related to what I need help with.

I've done this before through help from my dad, so I know it's possible. What I basically would like to do is show a list all records that start with a letter picked from a combo box. I.e. combo box letter selected is g, a list box on the form will show all records on my 1 table that start with the letter g.

there's a way to use dlookup (i believe), to show this by taking the first letter from all the fields and comparing them to the letter listed in the combo box. but I'm completely lost in how to do it.

View 1 Replies View Related

Dlookup Help

Aug 20, 2006

Im having a strange problem with my dlookup.

heres the code:-
Me.description = DLookup("[description]", "table2", "[partno] = '" & Me.PartNo & "'")

basically this is in the afterupdate of the partNo text box and when i enter a part no it brings up the description of the first record only no matter what part no i enter.Can anyone see a problem with the code.

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved