Forms Problem -PLEASE HELP -DLookup Function

Jun 26, 2007

Hi

I am having a problem with computation of monthly actual generated from the Amount column which is in a purchase order table..... The monthly budget amount is generated in a query named category query... I have computed like Jan Feb Mar till Dec the column fields in the query.... A form named PO form has been created with the category item combo box ....

The problem is when a user selects a combox box he or she is presented with the monthly actual textbox that shows the amount computed( on a fiscal basis(not calendar days)) and that is done by looking up at the date converting into a month and then computing the amount for that particular category item selected...sum done if there was the same category item like repairs and maintenance done for this amount on the same month different date...I need a way to look up at the date convert into a month and then show the sum in the field textbox using the Dlookup function ..>Can this be done??)

Monthly budget I cant figure a way to get the monthly budget by looking up at the date and show the computed amount on a "fiscal basis" since the monthly budget for different months jan feb mar is computed seperately in seperate fields in the query

Please help me!!! this is URGENt!!!

View Replies


ADVERTISEMENT

Forms :: Using Parameters With Dlookup Function

Mar 26, 2014

I am trying to use parameters for my dlookup =DLookUp("[jan]","[ctbDailySegments1]","[PCC]='0hq'")

How can I replace [jan] with a prameter to pick from a text field formated as date. and 0hq from a combobox cmbPCC.

The function works perfectly as I change the jan and 0hq.

View 2 Replies View Related

Forms :: DLookup Multiple Criteria Function

Jan 31, 2015

I can't seem to get past this expression/criteria problem.

[Actual] is my field I want to grab data from
[L3-4-5] is my main table
[CDATE] is a form control where the user enters a date
[Quarter] is a number field and want it to equal 1
[Partname] is a text field and string it to equal 1

My current expression is:

=DLookUp("ACTUAL","L3-4-5","ID=" & [CDATE] And "[QUARTER]=1" And "[PARTNAME]='1'")

Although my other expression on another form works.In my if code statement I have

Me.DAYS_TRAINED.Value = DLookup("Days", "TRAINED LH A-PILLAR", "ID=" & FTM_NAME)

So I think I don't understand the multiple criteria part.

View 3 Replies View Related

Forms :: How To Save Result Of DLookup Function (used In Unbound Text Box) In A Table

Oct 17, 2014

I have a form based on query. On form i am retrieving data from another table using DLookup in a unbound text box. So I want to save the result of DLookup function in another field/table on same form.

View 8 Replies View Related

DLookup Function

Dec 3, 2007

Hi guys! Would appreciate any suggestions that people have for my problem. How do you perform calculations in queries between tables? Do you use the DLookup function to update the values in the query, if not how so? I've heard from somewhere it may be useful to use the DLookup function, but i'm not really sure what this is!

Please help!

View 5 Replies View Related

Dlookup Function

Jul 12, 2005

I am trying to default a value in a field using the DLOOKUP function. I have attached the database. The Form is FrmDailySalesInput and the field is Trailer. I have set the default value as follows =DLookUp("[Trailer]","TblStoreInfo","[Store]=[TblStoreInfo]! [Store Location]"). I have seen alot of different syntax on this forum for DLOOKUP. I am using Access 2000 presently.

Also I want to default the value in but be able to change it if necessary.

Any Help would be appreciated.

Thank you
Valerie

View 6 Replies View Related

DLookup Function

Sep 13, 2007

I am receiving #Error in my unbound textbox where I am trying to use the DLookup Function to lookup the value that corresponds with "ADPCompany" and "Location Number" fields. Here is what my DLookup Function looks like:
' =DLookup("BranchNo","tblAllADPCoCodes","ADPCompany=" & Forms![frmMarthaPerPayPeriodDeduction]![ADPCompany])&","& DLookup("BranchNo","tblAllADPCoCodes","LocationNumber=" & Forms![frmMarthaPerPayPeriodDeduction]![LocationNo]) '

I'm not sure if I have the right syntax to include to things in the criteria.

View 1 Replies View Related

IFF With DLookup Function Produced #Name?

Apr 30, 2008

I was wondering if someone could point out what I'm doing wrong...

I have a (parent) form with 2 subforms. I would like the field in one subform to look at the value in the other subform... if that value is null I would like the field to display "N/A" otherwise I want it to perform a DLOOKUP....

I have the following but I'm not sure if I'm referencing the subform field correctly... I keep getting the #Name? when viewing the field from the parent form's display.

=IIf(IsNull(subfrmPROPOSALSetup.Form!LaborCategory 1),"N/A",DLookUp("LaborCategory1","LABOR","ProposalID=" & Forms!frmPROPOSALSetup!ProposalID))

View 2 Replies View Related

DLookup Function Issues

Sep 13, 2007

I am receiving #Error in my unbound textbox where I am trying to use the DLookup Function to lookup the value that corresponds with "ADPCompany" and "Location Number" fields. Here is what my DLookup Function looks like:

=DLookup("BranchNo","tblAllADPCoCodes","ADPCompany='" & Forms![frmMarthaPerPayPeriodDeduction]![ADPCompany]')&","& DLookup("BranchNo","tblAllADPCoCodes","LocationNumber='" & Forms![frmMarthaPerPayPeriodDeduction]![LocationNo]')

I'm not sure if I have the right syntax to include to things in the criteria.

View 9 Replies View Related

Compound In A DLookUp Function?

May 26, 2015

In these three formulas for the Ceil tutorial found here:

[URL]

one of the formulas is:

=IIf(IsNull([RoomNumber]),"",DLookUp("RoomType","Rooms","RoomNumber= '" & [RoomNumber] & "'"))

If one were interested in BedType or Rate then simply substitute that term for RoomType.

Now I am somewhat familiar with how DLookUp works. In other words get RoomType from a table Rooms where there is a given RoomNumber.

Where I get confused is the last clause:

"RoomNumber = '" & [RoomNumber] & ""

I realize it is a compound statement hence the &, but it uses two &s and more.

View 7 Replies View Related

HELP: Undefined Function 'DLookup' In Expression

Jul 6, 2005

i am trying to executed q query which has a Nz function. this works fine when exceuted from access. but when i try to executed the same from Vb i get an exception

"Undefined function 'Nz' in expression"

can anyone point out why this is happening? and wts the solution?

thanks in advance
ASMS

View 5 Replies View Related

How Can I Valid A Compound Key With Dlookup Function

Jul 5, 2006

In a form named PRODUCTION there are 3 text box for invoice data: xtype, xserie, xnumber

I need valid this data from the INVOICE table, where its key is a compound key (TPINV+SERINV+NUMINV)

I tried with:

Private Sub xnumber_AfterUpdate()
Dim searchinv as string
searchinv=Dlookup("*","[Invoice]", [tpinv]="& Forms![production].[xtype] and [xserie]= &Forms![production].[xnumber] and "&Forms![xnumber]
If searchinv ="" then
MsgBox ("Invoice doesn't exist'")
Cancel = True
End If
End Sub

... but it doesnt work.

View 1 Replies View Related

DLookup Function Using Two Combo Boxes As Criteria

Oct 10, 2007

I have a form where I am using two combo boxes the second combo box fields are being based on what is selected from the first comb box. When I enter the DLookup criteria into the text box I am trying to lookup based on the selection of the combo boxes it returns nothing. Here is what my DLookup looks like:
DLookup("[BranchNumber]", "[tblAllADPCoCodes]", "[ADPCompany]= '" & [cboADPCompany] & "' And [LocationNumber]= '" & [cboLocationNo] & "'")

View 1 Replies View Related

Modules & VBA :: DLookup In Custom Function Not Returning Values

Sep 13, 2013

I made a custom function to look certain value from table based on couple of criteria that it gets from query where I want to use it. Function's code is below:

Code:
Public Function PotteryWeights(strLocusID As Long, nrPotSubID As Long) As Variant
Dim priSubID As Long
Dim priLocusID As Long
Dim priResult As Variant
priSubID = nrPotSubID

[Code] ...

However, when I use it in query it only returns Case else - option and everything else is empty.

View 7 Replies View Related

DLookup Function To Load Information From Table To Another Table Using Subform

Mar 22, 2013

I have 3 table table; Invoice table, Product table and Sale_product table. Sale product table records all sale from the product table

Invoice table has these fields
ID
TOTAL
CASH_TENDERED
CHANGE

Product table has

ID
CODE
QUANTITY
NAME
PRICE

and Sale_Product table has these
ID
PRODUCT_CODE
QUANTITY
PRODUCT_NAME
PRICE
SUBTOTAL
INVOICE

I did main form from Invoice table and sub form from Sale_product table. I want to use DLOOKUP function to load the name and price, quantity and calculate subtotal automatically from the product table based on the product code entered. i have being trying hard and i keep on getting "Name? error"

View 1 Replies View Related

Forms :: SUM Function Produces Error From Calculated Function

Jan 30, 2014

I have a project at hand and it's been a predecessor of mine and client has asked me to do some work on it and extend functionality - but I have not really delved into Access before and I have had to worked my way through to this final snag :/

The Main Form has one sub form. This sub form allows the user to add multiple order items i.e. qty, stock, description from records within the system - fairly straight forward.At the last column of each row is the sub total of those particular items i.e.

Qty Unit | Item ID | Total
-----------------------
2 | 1234 | 80.00
------------------------
1 | 43526 | 20.00
------------------------
> | |

So the total is a function of =[Qty Unit] * [Unit Price].Then in the Footer of this SubForm is the Sub Total

=SUM([Qty Unit] * [Unit Price])

All fine and well..... However, the additional functionality kicks in.

Lets add the additional customer_id from the Main Form. Each Item bought is dependent on the customer_id i.e. they get special prices depending on who they are.So a New table is made which has the Item ID and SpecialPriceID (of a table to define as a specialPrice) and the Price linked to this Item and Special Price category. So say that there are two groups of users "wholesale" and "nonwholesale" these would be SP_1 and SP_2 and each client is defined either one of these, and each stock item has a Price for each SP_1 and SP_2. Hopefully I've explained myself there.

Back to the SubForm. So now the Total needs to calculated differently with needed the external customer_id from the Main Form.

Code:

Function CalculateSpecialPrice(ItemID As String, CustomerID As String, Unit As Integer)
Dim SPSelect As String
SPSelect = "SELECT Price FROM [Items_SpecialPrices] WHERE"
SPSelect = SPSelect & " ItemID = '" & ItemID
SPSelect = SPSelect & "' AND SpecialPriceID = (SELECT SpecialPriceID FROM Customers WHERE customer_id = " & CustomerID & ") "

[code]....

its the sub total I just keep on getting #Error on. I have even watched (using alerts) that the correct return variable is the same as the individual rows. This is the equation I used for the SubTotal within the footer.

=SUM(CalculateSpecialPrice([Item ID], [Form]![FormName]![CustomerID], [Qty Unit]))
#Error

View 2 Replies View Related

Forms :: Can't Get DLookup To Work

Oct 16, 2014

I'm trying to build a form that Pulls data from several tables, though will update only one. I'm having issues right now with a field that is supposed to draw from a query. I made a query that is supposed to concatenate different fields in another table, look for duplicated words and remove them, but although that isn't working yet, that's not my issue. My issue is that the DLookup in the form isn't even trying to look at the query. The query prints out workshop IDS and a concatenated field right now, so there is data to pull.

=DLookUp("[Expr1]","[Posting Title Query]", "[WorkShop_ID] =" & [WorkShop_ID])

Query name: Posting Title Query
Query Reference Field: WorkShop_ID
Query Data Field: Expr1

Form Name: Sessions
Form Reference Field: WorkShop_ID
Form Table: Session List

View 7 Replies View Related

Forms :: DLookup Cannot Update Txt Box

Jul 23, 2014

I have a new Customer Form(Profile) and I have the same customer data in another Table(Contacts).

I create a Dlookup... the system pull the data correctly from my Combobox but when I try to close the form, the system display a error like: The first name is empty...

I think the Dlookup need something to update the new table.

This's my actual Dlookup...

=DLookUp("[Last Name]","Contacts","[Combo378]='" & [Forms]![PROFILE]![Combo378] & "'")

View 1 Replies View Related

Forms :: DLookup - Not Valid Prompt

Jun 10, 2013

Is it possible in Access 2010 to have a prompt "Not Valid" in a dlookup?

If =DLookUp("[Lot]","tblBarcode","[Inuse] = -1") is No, then the message appears.

View 1 Replies View Related

Forms :: Setting Default Value Using DLOOKUP?

Jun 17, 2013

I have a form for new customers. One of the fields is the product they have chosen ("new model", "old model", etc.) in a drop down Combo box. I want default pricing to appear in the form based on the what user selects for the product. But, I am getting nothing shown in the price box after choosing the product.

I've tried two approaches but with no luck. What am I doing wrong? This is in the default property for "price"

=DLookUp("[priceDefault]","tbl_products","[product]= '" & [productChosen] & "'")

=DLookUp("[priceDefault]","tbl_products","[product]= " & [Forms]![frm_CustomerRegistration]![productChosen])

I'm using Access 2007 and Windows 7.

View 9 Replies View Related

Forms :: DLookup As Source For Text Box

Jun 2, 2014

Database has a form on which the user is to select a PP Type. This is a choice of up to 8 different kinds of types. There is a table in the database that keeps track of what each of these types are, either a pallet or a case. I need to create an unbound text box on the form that will display wether the chosen Type is a pallet or case. I understand DLookUp is the way to go on this but I am having a problem with the where clause part of the code.

What I am trying to write here is display in the text box the "Pallet Case" field in the "PP Type TBL", where the "PP Type" field of the "PP Type TBL" is the same as the selection in the combo box name "Type". PP FRM is the name of the form I am working on and where the text box is as well as the combo box.

DLookup("[Pallet Case]", "[PP Type TBL]", "[PP Type] = " & Forms![PP FRM]![Type])

I get #Error in the text box. My confusion is how do I refer to the PP Type as it is int he PP Type TBL in the criteria?

View 6 Replies View Related

Forms :: DLookup To (print) Another Table's Value

Mar 29, 2013

I have two tables each containing fields Brand, Form, Area. Table 1 has some other information that needs to be gathered (data entry) and Table 2 is just a reference table for changes to these areas. This reference table has an additional field labeled area point value which is the value I want to "print".

The form is based off of Table 1 and has all of the fields I want the users to input. Stripped down, I have three combo boxes for the user to choose Brand, Form, and Area...I also have an unbound textbox control where I want the area point value to based off of the value of the three aforementioned boxes.. I believe this can be achieved with a lookup but I've never actually used a lookup in a control this complex before...

View 1 Replies View Related

Forms :: Multiple DLookup Syntax

Feb 24, 2015

Me.txtversion = "Ver:" & " " & DLookup("[txtVersionMajor] & " - " & [txtVersionMinor] & " - " & [txtVersionRevision]", "tblVersionInfo")

What's wrong with my syntax ? It's the "-" part that is the problem.

View 3 Replies View Related

Forms :: DLookup - Changing Value In A Form

Feb 26, 2014

I'm making a form for colleagues to use which will eventually populate a table. I'm using DLookup to populate some of the fields in the form from another table. The problem is that for a few of the fields in that other table, the values are incorrect.

(Obviously the most sensible thing to do would be to amend the source data but for various reasons I cannot do that.)

For example, "date built" in the original table might be "f" but that needs to be changed to "h", so I tried the following but it doesn't work:
.................................................. ............................................

If DLookup("date_built", "dbo_meas_questionnaire", "[meas_id] = Forms!FrmRetestSearch.numOrigId") = "f" Then
Me.TxtDateBuilt = "h"
Else
Me.TxtDateBuilt = DLookup("date_built", "dbo_meas_questionnaire", "[meas_id] = Forms!FrmRetestSearch.numOrigId")
End If
.................................................. ..................................................

View 4 Replies View Related

Forms :: DLookup A Combo Box In A Table?

Apr 20, 2013

Iv got a Form (Form1).That has a combo Box (Description)and a Text box (Category).that refers to a Table (tblDescriptionLU)With a text Field (Description) and a Lookup Field (Category) to a Table (tblListOfCategorys)

The Code iv Put in is:

Private Sub Description_AfterUpdate()
Category = DLookup("Category", "tblDescriptionLU", "Description=" & Description)
End Sub

It returns a Error:

Run-time error '3464':
Data type mismatch in criteria expression.

View 6 Replies View Related

Forms :: DLookup Without Initial Characters

Feb 12, 2015

I run duplicate check on a form to make sure the file name doesn't match one that's previously been entered. Currently I have:

If Me.NewRecord Then
If Not IsNull(DLookup("File", "tblFileProcessing", "[File]=""" _
& Me![File] & """" & " and [FileClientID] = " & Me![FileClientID])) Then
DoCmd.OpenForm "frmDuplicateFiles", acNormal, , , , acDialog
End If
End If

However we've recently changed the way we work and have now added a unique ID number prefixed to the file name: 567_File_Name_1 How do I run the DLook up but parse off the digits prior to the first underscore and only check on the remainder of the file name?

View 5 Replies View Related







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