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