473,387 Members | 1,590 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,387 software developers and data experts.

Report DLookup Field Filtering

I have a report generated via an ID selection made in a dropdown on a
form. The report filters by an on click event in a preview report
button on the form. Everything in the report, including subreports,
filters perfectly, with the exception of a running sum DLookup field on
the main report. This field looks up a value in a foreign table. I'm
not clear where I'm supposed to be filtering this field, since it
obviously isn't picking up the filter generated by the form's on click
event. I've tried using:

=Dlookup("[Foreign Table Name]","[Foreign Table Field
Name]","[ID]=[Forms]![Name of Form]![ID]"), as well as created an On
Open event in the report that filters based on the ID selected in the
form. Neither works--everything generates an error message in the
DLookup field. Help??? Thanks.

Nov 13 '05 #1
1 5216
<ms****@soon.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
I have a report generated via an ID selection made in a dropdown on a
form. The report filters by an on click event in a preview report
button on the form. Everything in the report, including subreports,
filters perfectly, with the exception of a running sum DLookup field on
the main report. This field looks up a value in a foreign table. I'm
not clear where I'm supposed to be filtering this field, since it
obviously isn't picking up the filter generated by the form's on click
event. I've tried using:

=Dlookup("[Foreign Table Name]","[Foreign Table Field
Name]","[ID]=[Forms]![Name of Form]![ID]"), as well as created an On
Open event in the report that filters based on the ID selected in the
form. Neither works--everything generates an error message in the
DLookup field. Help??? Thanks.


Supposing [ID] is numeric:
=Dlookup("[Foreign Table Name]","[Foreign Table Field
Name]","[ID]=" & [Forms]![Name of Form]![ID])

If [ID] is string:
=Dlookup("[Foreign Table Name]","[Foreign Table Field
Name]","[ID]='" & [Forms]![Name of Form]![ID] & "'")

Bruno
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: deko | last post by:
I can't move a multi-page report to the last record unless I keep the popup form (that defined it's subreports) open. DoCmd.OpenReport "rptStandard", acViewNormal DoCmd.Close acForm,...
5
by: Tony Williams | last post by:
I have a table "tblmaintabs" that stores data that is collected from various companies on a quarterly basis in March, June, September and December each year (these dates are stored in a Date/time...
3
by: timcos | last post by:
OK...I am creatiung a report...much like a letter. I have a text box. It is supposed to hold the LLC Name' The database is "Client Info List" The field is called "LLC NAME" The text box...
2
by: Nick J | last post by:
Hi, I currently have a report set up on tblDownload but in the report I want to fill a text box with information from a field in another table. Thanks. -- Kind Regards...
15
by: shaqattack1992-newsgroups | last post by:
Hello Everyone, Let me explain my problem. I have included 2 dashes between each pair of records to make it easier to see what goes together. In reality, it is just a long list of results...
13
by: nzyui | last post by:
Trying to lookup a field from a table called condition this is a separate table not linked to anything: setup as shown Code S M L DG 1 2 3 RI 2 4 5 need...
2
by: manfran | last post by:
Using Access 2003 on Windows XP SP2 I have a report based on a query. It's meant to display a complete order, which is based on two tables, “Proposals” and “Orders”. In the proposal table, I quote...
9
by: magickarle | last post by:
Hi, I have a database in access with the following columns: Day AgentID ManagerID Grade They got information about agents and some grades. I would like to have ONE form with several...
2
by: Steve | last post by:
I'm working on a report for an existing database. The report will be a directory of over 500 employees and thus multiple pages. What do I need to do to show the first employee and the last employee...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.