473,830 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EMAILING A REPORT AS ATTACHMENT LINKED TO A SPECIFIC RECORD IN A FORM

I have a report with it's source from a query. The query calls data
from 3 related tables. The report is a meeting agenda and I only want
to attach a snapshot report to my email based on the specific record
on a form. I tried using stLinkCriteria but it always captures all
the records on my query as one snapshot attachment with all the
records. The only way I can filter the record I wanted was to add a
field to my table that users manually set to "Yes" and the query
criteria set to "Yes". After sending the email, my users have to
uncheck the Yes box. I would like to not use this option. Help
please!

Fred Crisostomo

May 20 '07 #1
1 2447
It's hard to answer, without knowing _how_ you are sending the email.

There are any number of ways to go about opening a bound object with a
filter condition, the easiest is:
DoCmd.OpenRepor t "asdf", WhereCondition: ="fieldName= '" &
me.txtFilterCon d & "'"

but depending on how you are emailing the report, you may not have the
option to specify a WhereCondition. In this case a possible route is
to alter your report's underlying query on the fly. Something like:

'Alter the reports recordsource query
dim qry as dao.querydef
set qry = currentdb.Query Defs("qryBoundQ uery")
qry.sql = "Select * from qryBaseQuery Where fieldName="' &
me.txtFilterCon d & "'"

'Do your email thing
call emailSub

May 21 '07 #2

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

Similar topics

0
1277
by: Tiago Miguel Silva | last post by:
I there. I´m almost desperate with a report that i´m doing! I am creating a report using the push method, being the data returned by a typed dataset. The report shows activities by week and have a subreport with the exactly same records, but with more information. It looks something like this: Sat 1 _______________ Sun 2 _______________
3
4206
by: Chris | last post by:
Hello all. I have a database that I use to send email updates to people. Everything is working fine, but one suggestion I keep getting is to add a link to the automatic emails that will open up the database, then open to the correct form and record. I can write a simple macro to open a form and a specific record, but what I can't figure out is how can I get that speciic record number in a command line link? Here's an example...
3
2065
by: Jer | last post by:
Using Access 2003 w/Windows XP. I have a database originally created with the tables internal. I split the database into a front-end/back-end with linked tables. Now when I open one of the reports, I get #error in some of the fields. I created two new databases from scratch and imported the front-end objects into one database and imported the tables into the other and re-linked them. I still get the error. The report is opened from a...
2
3343
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket” is simply a ticket-number. I’ve made a form in which I am to choose an existing Ticket and write a description for it pluss other things. The description to these Tickets are stored in another table called ”LogBook”. I then made a query on all of...
2
1734
by: crisostomofred | last post by:
I have a report with it's source from a query. The query calls data from 3 related tables. The report is a meeting agenda and I only want to attach a snapshot report to my email based on the specific record on a form. I tried using stLinkCriteria but it always captures all the records on my query as one snapshot attachment with all the records. The only way I can filter the record I wanted was to add a field to my table that users...
7
79884
ADezii
by: ADezii | last post by:
Use the FindRecord Method of the DoCmd Object (least efficient) - The simplest approach for finding a specific Record is to create an Event Procedure for the Combo Box that mirrors each step of the generic Find process. Private Sub cboFind_AfterUpdate() Application.Echo False Me!.SetFocus DoCmd.FindRecord cboFind cboFind.SetFocus
2
1247
Ali Rizwan
by: Ali Rizwan | last post by:
Hello everyone I want to make report for a specific record instead of whole record how can i do this.
1
6581
by: cvillav | last post by:
Hello, I am new to Access and this forums, I have two tables and two forms to display the data. Tables Tbuilding Tcriteria Forms fmbuilding
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10774
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10206
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9315
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7746
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.