Questions tagged [dlookup]

DLookup is a built-in MS-Access function to get the value of a particular field from the set of records or data from table, query, SQL, or Recordset.

60 questions
0
votes
1 answer

DLookup produces runtime error 2471 - No error trapping that I have tried works

The exact wording of the error displayed is "Run-time error: The expression you entered as a query perameter produced this error:" and it then gives "ThisCode" Function GetCageFileNumber(ThisCode As String) As Integer Dim sSQL As String …
AnthonyJ
  • 13
  • 3
0
votes
1 answer

DLOOKUP for filling a text box using 2 combo box selections

=DLookUp([GTIN],"tblGTIN","VarietyCode = " & [Forms]![frmCaseLabel]![VarietySelected] & "AND PackType =" & [Forms]![frmCaseLabel]![PackInput]) Returns: #Error =DLookUp([GTIN],"tblGTIN","VarietyCode = " &…
0
votes
1 answer

My dlookup function made my MS access database slow

is there any function instead of Dlookup to fast my database? here is my code: Me.txtMacroDispTest1.Value = DLookup("[TestNo]", "tblmetallurgy8", _ "[FirstArticleNumber] = '" & Me.txtFirstArticlenumber & "' and [TestNoID] = 1") I want to display…
Mani
  • 1
0
votes
1 answer

populating field data by Dlookup in access

I'm trying to populate data from a query (SUMA PALETS) that counts the records from a field (its related table is called "LOTES PRODUCTOS") to a field in a subform (PEDIDOS PRODUCTOS). Both, query (and its related table) and subform (and its related…
Ruy
  • 27
  • 4
0
votes
2 answers

DLookup Function in Access returns Type Mismatch Error

I'm trying to use the DLookup function and it keeps giving me a type mismatch error. See code below: If IsNull(DLookup("[CheckedOutTo]", "tbl_Transaction", "[CheckedInDate]" = Null And "AssetID = " & Forms!frm_NewTransaction!SN)) CheckedOutTo is…
0
votes
0 answers

MS-Access, DLookup won't work while bound to non-ID column

I'm dealing with a Dlookup malfunction, and I've tried everything I can think of with no success. So I have a combobox that has the ID and grade name as columns. The ID is numerical while the grade name is a mixture of numbers, letters, and a dash.…
0
votes
1 answer

If Dlookup doesn't meet criteria in several tables then display error. Microsoft Access

Ok I could use some advice please as I am not frequently used to VBA. I have a form and within that form, I have a subform that is built by a make table. I am in no need to change this. I however would like to add a sanity check before pressing the…
Sebastian
  • 13
  • 7
0
votes
1 answer

DLookUp returning run-time error 424 - Object Required

I'm new to VBA and am trying to get a macro I'm writing to check if there is already a pre-existing record corresponding to the date/shift combination of the new record to be added. To do so, I'm trying to use DLookup to search through the database…
0
votes
1 answer

Using nested DLookUP with Null values not returning results #Error

I have a form that selects the customer name. Once the customer is selected, the subform shows a list of plots they own. I am trying to bring up who is buried in each plot in the subform. I just need the name to show up which in a different table. I…
jsvanc
  • 23
  • 3
0
votes
2 answers

Nested Dlookup VBA

I'm trying to display the Vendor Name and a message that a selected PO Number (from a combo box on the form) does not require QA in a message box. The DLookup to get the vendor number from the PO Number works, but I can't seem to nest it to get the…
Newbie
  • 55
  • 5
0
votes
1 answer

DLookup expression always returning the same record

I have a form called ProductionReportLandscape that has a table called ProductMasterData set as its record source. There is text box control called CartonDateFormat (which gets its value from the ProductMasterData table) as well as an unbound text…
0
votes
2 answers

Outputting the result of an SQL query into a text box

I'm creating a form that displays information about an individual that is taken from two tables when a name is entered by the user. I want the fields to be output into they're own text boxes. My code looks similar to what's below. When I run the…
Moneyhun
  • 19
  • 1
  • 9
0
votes
0 answers

Pivot table - Dlookup in definition column null

In ACCESS for OFFICE 365 I've a table and I want to transform it in a pivot table, with a number of columns fixed (that must appear also if the value is null). As the columns are more than 200, if i write: TRANSFORM Sum([2013-com-Nazioni-Def].N)…
0
votes
2 answers

DLookup: Criteria returning blank values

I am trying to create an expression in Access 2016 to return a value from another table when a key is matched from the current table. I am sure it is syntax related, but am at a loss.... I want to add the receipt date (in tbl_RECEIPTS) as a column…
RAReed
  • 101
-1
votes
1 answer

Why is there a syntax error in my Dlookup

I am trying to create a function that can return me the employee name given the employee ID on a shared table but error pops out: "Runtime Error '3075': Syntax error in string in query expression '[Employee ID] = 'XXXXX' ". I tried to implement…
1 2 3
4