473,406 Members | 2,713 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,406 software developers and data experts.

Help determining Record Source for report

I have a form that has a table; tblProjects; as its record source. The form
is filtered, however, by two combo boxes in the header. One allows the user
to select a client, the other a project for that client. These two
selections populate the form with info from that tblProjects table. I want
to create a report that would contain the information from that form but I
have no idea what my record source should be for the report so that it
contains only the information for that one client and one project. I tried
using the same record source and filter at the form (RS = tblProjects and
Filter = ProjectID = Forms!frmWorksheet!SelectProject) but it doesnt work.
The report shows all of the records in tblProjects. Any thoughts on where
to begin?
May 21 '06 #1
1 1625
"Robert" <no**@email.com> wrote in
news:hM********************@fe07.news.easynews.com :
I have a form that has a table; tblProjects; as its record
source. The form is filtered, however, by two combo boxes in
the header. One allows the user to select a client, the other
a project for that client. These two selections populate the
form with info from that tblProjects table. I want to create a
report that would contain the information from that form but I
have no idea what my record source should be for the report so
that it contains only the information for that one client and
one project. I tried using the same record source and filter
at the form (RS = tblProjects and Filter = ProjectID =
Forms!frmWorksheet!SelectProject) but it doesnt work. The
report shows all of the records in tblProjects. Any thoughts
on where to begin?

You use the same recordsource as the form: tblProjects.
Use the whereclause parameter of the .openreport method of DoCmd
to pass the filter conditions from the form to the report.

In the on_click event for the button that opens the report,
simply set the where clause to

stWhereClause = "ProjectID = " & me!SelectProject
stDocName = "ProjectReport"

Docmd.OpenReport stDocName,acPreview,,,stWhereClause

since you are calling the report from the form,
me. is defined as Forms!frmWorksheet

--
Bob Quintal

PA is y I've altered my email address.
May 21 '06 #2

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

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
2
by: Koen | last post by:
Hi all, I've struggled with the following problem and welcome all a suggestions to solve this. I have a form that list records from a table with observations. The record source for the table...
3
by: RWC | last post by:
Hello, I have an issue that's driving me batty! I have a report, whose record source is SQL based on a normalized set of tables. There are no nested queries and no dlookups in this record...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
1
by: kkrizl | last post by:
I have a form that displays general information about an alarm permit location. There's a subform that shows detailed information about burglar alarms that have gone off at the location. When a...
4
by: Don Sealer | last post by:
I have a form that is based on a table called CVA Defects Table. Three of the fields in the table and form are Oil line defects, Gas line defects, and Sub assembly defects. These fields use...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
by: Peter Herath | last post by:
I have created a report using sample codes taken by the forum. one problem is that the report displays the field/column names in the table in columnar format(field names display in rows.) but i want...
3
by: Gord | last post by:
If I have a form open with a subform control on it in datasheet view that has its record source set to a query or a table, is it possible to determine which record the user has clicked into with...
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: 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
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,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.