473,387 Members | 1,549 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.

Form and Email sent from Access

I have a main form containing a command SEND button that prompts an
email form to pop up.

The email address(es) that are supposed to appear on the email form
are those corresponding to the respective agency record appearing on
the main form at the current time.

Instead, what I get is the email form without the appropriate
information in the textboxes of the email form.

I checked the earlier version of the database for answers, the VBA
code of the command SEND button, the email form and the query
supplying values to the email form!

I can't figure this one out!

Any suggestions?

Thanks,
John
Sep 8 '08 #1
4 3443
Could you provide a little more information? For example, by "email
form" do you mean an Access form or an Outlook form? What does your VBA
procedure look like? What is your query like?

We really don't have enough to go on right now to give you any sort of
meaningful assistance.

Thanks,

Carlos

zufie <jo***********@illinois.govwrote in news:133d7375-3cb0-484f-995c-
2b**********@i76g2000hsf.googlegroups.com:
I have a main form containing a command SEND button that prompts an
email form to pop up.

The email address(es) that are supposed to appear on the email form
are those corresponding to the respective agency record appearing on
the main form at the current time.

Instead, what I get is the email form without the appropriate
information in the textboxes of the email form.

I checked the earlier version of the database for answers, the VBA
code of the command SEND button, the email form and the query
supplying values to the email form!

I can't figure this one out!

Any suggestions?

Thanks,
John
Sep 9 '08 #2
On Sep 9, 12:39*pm, "Carlos Nunes-Ueno" <sulla...@athotmaildot.com>
wrote:
Could you provide a little more information? *For example, by "email
form" do you mean an Access form or an Outlook form? *What does your VBA
procedure look like? *What is your query like?

We really don't have enough to go on right now to give you any sort of
meaningful assistance.

Thanks,

Carlos

zufie <john.marru...@illinois.govwrote in news:133d7375-3cb0-484f-995c-
2b86832bd...@i76g2000hsf.googlegroups.com:
I have a main form containing a command SEND button that prompts an
email form to pop up.
The email address(es) that are supposed to appear on the email form
are those corresponding to the respective agency record appearing on
the main form at the current time.
Instead, what I get is the email form without the appropriate
information in the textboxes of the email form.
I checked the earlier version of the database for answers, the VBA
code of the command SEND button, the email form and the query
supplying values to the email form!
I can't figure this one out!
Any suggestions?
Thanks,
John- Hide quoted text -

- Show quoted text -
Yes, Sorry.

I have a form "frmIBCCP Referral" which contains a Send command button
and a textbox containing the email address for the respective agency
record on the "frmIBCCP Referral".

Here is the VBA behind the Send command button:

Private Sub Command39_Click()
On Error GoTo Err_Command39_Click

Dim stDocName As String
Dim stLinkCriteria As String
Me.Refresh

stDocName = "frmIBCCPemail"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command39_Click:
Exit Sub

Err_Command39_Click:
MsgBox Err.Description
Resume Exit_Command39_Click

End Sub

The Send command button opens another form, frmIBCCPemail.

After clicking the Send command button on "frmIBCCP Referral" the
following should show on the frmIBCCPemail:

frmIBCCPemail also contains a textbox containing the same email
address for the respective agency record on the "frmIBCCP Referral".

frmIBCCPemail will also show a second email address in the textbox
(for the respective agency record on the "frmIBCCP Referral") that one
can see using the via navigation buttons at the bottom of
frmIBCCPemail.

What instead occurs is that I receive a:

"Enter Parameter Value" dialogue box with the following on it: [Forms]!
[Main].[frmIBCCPReferrals].[Form].[Agency]

AND

After I click the Send command button on frmIBCCPemail I receive the
following:

"Run-Time Error 2498 - An expression you entered is the wrong data
type for one of the arguments".

Here is the VBA code when I try to debug:

Private Sub Command37_Click()
DoCmd.SendObject acSendReport, "rptIBCCPReferrals", acFormatSNP, Me!
Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[SentTo].Value = Me!Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[DateSent].Value = Now()
End Sub

The second line of the VBA code, DoCmd.SendObject acSendReport,
"rptIBCCPReferrals", acFormatSNP, Me!Email
appears highlighted when I debug.

The Send command button on frmIBCCPemail should open an MS Outlook
2003 email message.

Hope this is enough detail.

Thanks,

John

Sep 10 '08 #3
On Sep 10, 9:59*am, zufie <john.marru...@illinois.govwrote:
On Sep 9, 12:39*pm, "Carlos Nunes-Ueno" <sulla...@athotmaildot.com>
wrote:


Could you provide a little more information? *For example, by "email
form" do you mean an Access form or an Outlook form? *What does your VBA
procedure look like? *What is your query like?
We really don't have enough to go on right now to give you any sort of
meaningful assistance.
Thanks,
Carlos
zufie <john.marru...@illinois.govwrote in news:133d7375-3cb0-484f-995c-
2b86832bd...@i76g2000hsf.googlegroups.com:
I have a main form containing a command SEND button that prompts an
email form to pop up.
The email address(es) that are supposed to appear on the email form
are those corresponding to the respective agency record appearing on
the main form at the current time.
Instead, what I get is the email form without the appropriate
information in the textboxes of the email form.
I checked the earlier version of the database for answers, the VBA
code of the command SEND button, the email form and the query
supplying values to the email form!
I can't figure this one out!
Any suggestions?
Thanks,
John- Hide quoted text -
- Show quoted text -

Yes, Sorry.

I have a form "frmIBCCP Referral" which contains a Send command button
and a textbox containing the email address for the respective agency
record on the "frmIBCCP Referral".

Here is the VBA behind the Send command button:

Private Sub Command39_Click()
On Error GoTo Err_Command39_Click

* * Dim stDocName As String
* * Dim stLinkCriteria As String
* * Me.Refresh

* * stDocName = "frmIBCCPemail"
* * DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command39_Click:
* * Exit Sub

Err_Command39_Click:
* * MsgBox Err.Description
* * Resume Exit_Command39_Click

End Sub

The Send command button opens another form, frmIBCCPemail.

After clicking the Send command button on "frmIBCCP Referral" the
following should show on the frmIBCCPemail:

frmIBCCPemail also contains a textbox containing the same email
address for the respective agency record on the "frmIBCCP Referral".

frmIBCCPemail will also show a second email address in the textbox
(for the respective agency record on the "frmIBCCP Referral") that one
can see using the via navigation buttons at the bottom of
frmIBCCPemail.

What instead occurs is that I receive a:

"Enter Parameter Value" dialogue box with the following on it: [Forms]!
[Main].[frmIBCCPReferrals].[Form].[Agency]

AND

After I click the Send command button on frmIBCCPemail I receive the
following:

"Run-Time Error 2498 - An expression you entered is the wrong data
type for one of the arguments".

Here is the VBA code when I try to debug:

Private Sub Command37_Click()
DoCmd.SendObject acSendReport, "rptIBCCPReferrals", acFormatSNP, Me!
Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[SentTo].Value = Me!Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[DateSent].Value = Now()
End Sub

The second line of the VBA code, DoCmd.SendObject acSendReport,
"rptIBCCPReferrals", acFormatSNP, Me!Email
appears highlighted when I debug.

The Send command button on frmIBCCPemail should open an MS Outlook
2003 email message.

Hope this is enough detail.

Thanks,

John- Hide quoted text -

- Show quoted text -
Upon opening the database I also receive the Run-Time Error 2465 - MS
Access can't find the field "Agency" referred to in your expression.

Here is the VBA when I debug:

Private Sub Form_Current()
Me!Agency.Requery
'Debug.Print Me!Agency
End Sub

The second line of the VBA code, Me!Agency.Requery, appears
highlighted when I debug.

Thanks,

John
Sep 10 '08 #4
You're getting the "Enter Parameter Value" message because the query that
you're basing frmIBCCPemail has [Forms]![Main].[frmIBCCPReferrals].
[Form].[Agency] as a criterion and that expression is not resolving to a
value. I would check that first and make sure that the Agency control is
still there and that the name you have there is correct and so on. The
fact that you're getting the "Access can't find the field" error also
strongly suggests taht the field has been deleted or renamed.

I'm not sure what to make of the second issue. It would seem like it
would be due to the Email field, but I can't reproduce the problem. The
other arguments should be fine, especially since two of them are VB
constants. I'd suggest putting a break point before that line and adding
something like Debug.Print Me!Email and see if you're getting what you
expect.

Hope that helps,

Carlos

zufie <jo***********@illinois.govwrote in
news:3f**********************************@25g2000h sx.googlegroups.com:
>>
Yes, Sorry.

I have a form "frmIBCCP Referral" which contains a Send command
button and a textbox containing the email address for the respective
agency record on the "frmIBCCP Referral".

Here is the VBA behind the Send command button:

Private Sub Command39_Click()
On Error GoTo Err_Command39_Click

* * Dim stDocName As String
* * Dim stLinkCriteria As String
* * Me.Refresh

* * stDocName = "frmIBCCPemail"
* * DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command39_Click:
* * Exit Sub

Err_Command39_Click:
* * MsgBox Err.Description
* * Resume Exit_Command39_Click

End Sub

The Send command button opens another form, frmIBCCPemail.

After clicking the Send command button on "frmIBCCP Referral" the
following should show on the frmIBCCPemail:

frmIBCCPemail also contains a textbox containing the same email
address for the respective agency record on the "frmIBCCP Referral".

frmIBCCPemail will also show a second email address in the textbox
(for the respective agency record on the "frmIBCCP Referral") that
one can see using the via navigation buttons at the bottom of
frmIBCCPemail.

What instead occurs is that I receive a:

"Enter Parameter Value" dialogue box with the following on it:
[Forms]! [Main].[frmIBCCPReferrals].[Form].[Agency]

AND

After I click the Send command button on frmIBCCPemail I receive the
following:

"Run-Time Error 2498 - An expression you entered is the wrong data
type for one of the arguments".

Here is the VBA code when I try to debug:

Private Sub Command37_Click()
DoCmd.SendObject acSendReport, "rptIBCCPReferrals", acFormatSNP, Me!
Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[SentTo].Value = Me!Email
[Forms]![Main].[frmIBCCPReferrals].[Form].[DateSent].Value = Now()
End Sub

The second line of the VBA code, DoCmd.SendObject acSendReport,
"rptIBCCPReferrals", acFormatSNP, Me!Email
appears highlighted when I debug.

The Send command button on frmIBCCPemail should open an MS Outlook
2003 email message.

Hope this is enough detail.

Thanks,

John- Hide quoted text -

- Show quoted text -

Upon opening the database I also receive the Run-Time Error 2465 - MS
Access can't find the field "Agency" referred to in your expression.

Here is the VBA when I debug:

Private Sub Form_Current()
Me!Agency.Requery
'Debug.Print Me!Agency
End Sub

The second line of the VBA code, Me!Agency.Requery, appears
highlighted when I debug.

Thanks,

John
Sep 10 '08 #5

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
1
by: Daniel | last post by:
Hi, i need som help!!! I have a form wich a user type some new data in! And when he/she hits the 'Add' button... i want the data on the form to fly straight into an existing table!! Please...
16
by: whyyyy | last post by:
The script below works fine if the form is filled out and submitted. But a (blank) e-mail is sent whenever the page loads, even when the form is not submitted. I would like to receive the e-mail...
4
by: pbd22 | last post by:
hi. could somebody tell me, when uploading a file, i know the form where the upload component is must have enctype=multipart/form-data but, is the same true for the form with the server code to...
0
by: karen987 | last post by:
Please could someone help me with this code? The problem appears to be a simple one, but i'm not html or ASP literate and need to modify the below code to add 2 things. First a bit about the...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
3
by: RLN | last post by:
I have an app that will send out an email periodically. My table has one row and three columns: a primary key, an "EmailFrom" Address and an Email template. The template is the text of the...
8
by: chromis | last post by:
Hi, I'm writing a contacts section for a cms on a website, I've decided to write the section in OO code. So far I have my Contacts object and a page structure I would use for a procedural site. ...
0
by: gnawz | last post by:
I have a feedback form code which does email but does not display the correct content. In place of the email address, it displays "+1" And the body message is "1" It works well when I test...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.