How do I get remove the dialog box that pops up each time a fax is getting ready to be sent. I just want them to go. Right now the user would have to click the yes each time.
I just want to have a message box show up that says you are about to seen 12 faxes do you want to send they click yes and 12 send with no dialog box if no the action cancels. -
Dim db As DAO.Database
-
Dim rst As DAO.Recordset
-
Dim strName As String
-
Dim strFaxNo As String
-
Dim strFax As String
-
-
Set db = CurrentDb
-
-
strSQL = "SELECT TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep FROM tara INNER JOIN TProdInfo ON tara.ProdCd = TProdInfo.ProdCd GROUP BY TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep, tara.Email HAVING (((tara.Keep)=True) AND ((tara.Email)=fOSUserName()));"
-
-
Set rst = db.OpenRecordset(strSQL)
-
-
rst.MoveFirst
-
-
Do Until rst.EOF
-
gProdCd = rst!ProdCd
-
strName = "/Name=" & rst![Contact Name]
-
strFaxNo = "/Fax=" & rst![Fax Number]
-
-
strFax = strName & strFaxNo & "/<fax@faxit.travp.net>"
-
-
DoCmd.SendObject acSendReport, "RPCDemandFax", acFormatRTF, strFax, , , "Outstanding Property Casualty Policies", "Please Review the Following Outstanding Policies", False
-
rst.MoveNext
-
Loop
-
End Sub
-
14 2565 Denburt 1,356
Recognized Expert Top Contributor
I think this should work, I used the setwarnings command, this can be especially dangerous since you can delete everything in your db with no prompt if you do not return it to it's original state of true. You shouls add some error trapping in here and make sure if an error is trapped you set the setwarnings command = true in that area. Hope this helps. -
Dim db As DAO.Database
-
Dim rst As DAO.Recordset
-
Dim strName As String
-
Dim strFaxNo As String
-
Dim strFax As String
-
Setwarnings = false
-
Set db = CurrentDb
-
-
strSQL = "SELECT TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep FROM tara INNER JOIN TProdInfo ON tara.ProdCd = TProdInfo.ProdCd GROUP BY TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep, tara.Email HAVING (((tara.Keep)=True) AND ((tara.Email)=fOSUserName()));"
-
-
Set rst = db.OpenRecordset(strSQL)
-
'To prevent an error when your recordset is empty use the following
-
If not rst.eof then
-
rst.MoveFirst
-
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+vbYesNo
-
if YesNo = vbNo then exit sub
-
-
Do Until rst.EOF
-
gProdCd = rst!ProdCd
-
strName = "/Name=" & rst![Contact Name]
-
strFaxNo = "/Fax=" & rst![Fax Number]
-
-
strFax = strName & strFaxNo & "/<fax@faxit.travp.net>"
-
-
DoCmd.SendObject acSendReport, "RPCDemandFax", acFormatRTF, strFax, , , "Outstanding Property Casualty Policies", "Please Review the Following Outstanding Policies", False
-
rst.MoveNext
-
Loop
-
Setwarnings = true
-
End Sub
-
I think this should work, I used the setwarnings command, this can be especially dangerous since you can delete everything in your db with no prompt if you do not return it to it's original state of true. You shouls add some error trapping in here and make sure if an error is trapped you set the setwarnings command = true in that area. Hope this helps. -
Dim db As DAO.Database
-
Dim rst As DAO.Recordset
-
Dim strName As String
-
Dim strFaxNo As String
-
Dim strFax As String
-
Setwarnings = false
-
Set db = CurrentDb
-
-
strSQL = "SELECT TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep FROM tara INNER JOIN TProdInfo ON tara.ProdCd = TProdInfo.ProdCd GROUP BY TProdInfo.ProdCd, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep, tara.Email HAVING (((tara.Keep)=True) AND ((tara.Email)=fOSUserName()));"
-
-
Set rst = db.OpenRecordset(strSQL)
-
'To prevent an error when your recordset is empty use the following
-
If not rst.eof then
-
rst.MoveFirst
-
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+vbYesNo
-
if YesNo = vbNo then exit sub
-
-
Do Until rst.EOF
-
gProdCd = rst!ProdCd
-
strName = "/Name=" & rst![Contact Name]
-
strFaxNo = "/Fax=" & rst![Fax Number]
-
-
strFax = strName & strFaxNo & "/<fax@faxit.travp.net>"
-
-
DoCmd.SendObject acSendReport, "RPCDemandFax", acFormatRTF, strFax, , , "Outstanding Property Casualty Policies", "Please Review the Following Outstanding Policies", False
-
rst.MoveNext
-
Loop
-
Setwarnings = true
-
End Sub
-
this comes back with an sytanx error.
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+v bYesNo
Also when do i return it to it's original state when I caputure the error or at the end of the loop
Denburt 1,356
Recognized Expert Top Contributor
this comes back with an sytanx error.
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+v bYesNo
Also when do i return it to it's original state when I caputure the error or at the end of the loop
Missed a parenthesis.
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+v bYesNo) -
Public Sub Whatever()
-
On error goto DumbErrorTrap
-
-
'Do this and that
-
loop
-
setwarnings = true
-
-
Exit_DumbErrorTrap:
-
Exit sub
-
-
DumbErrorTrap:
-
setWarnings = true
-
'if you want put an error message here!
-
Missed a parenthesis.
YesNo = MsgBox ("You are about to enter " & rst.RecordCount & " records!", vbInformation+v bYesNo) -
Public Sub Whatever()
-
On error goto DumbErrorTrap
-
-
'Do this and that
-
loop
-
setwarnings = true
-
-
Exit_DumbErrorTrap:
-
Exit sub
-
-
DumbErrorTrap:
-
setWarnings = true
-
'if you want put an error message here!
-
I had to add "end if" statements to get the code to work.
But the microsoft dialog box still opened up.
im db As DAO.Database
Dim rst As DAO.Recordset
Dim strName As String
Dim strFaxNo As String
Dim strFax As String
SetWarnings = False
Set db = CurrentDb
strSQL = "SELECT TProdInfo.ProdC d, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep FROM tara INNER JOIN TProdInfo ON tara.ProdCd = TProdInfo.ProdC d GROUP BY TProdInfo.ProdC d, TProdInfo.[Contact Name], TProdInfo.[Fax Number], tara.Keep, tara.Email HAVING (((tara.Keep)=T rue) AND ((tara.Email)=f OSUserName())); "
Set rst = db.OpenRecordse t(strSQL)
'To prevent an error when your recordset is empty use the following
If Not rst.EOF Then
rst.MoveFirst
YesNo = MsgBox("You are about to Fax " & rst.RecordCount & " records!", vbInformation + vbYesNo)
If YesNo = vbNo Then
Exit Sub
End If
Do Until rst.EOF
gProdCd = rst!ProdCd
strName = "/Name=" & rst![Contact Name]
strFaxNo = "/Fax=" & rst![Fax Number]
strFax = strName & strFaxNo & "/<fax@faxit.trav p.net>"
DoCmd.SendObjec t acSendReport, "RPCDemandF ax", acFormatRTF, strFax, , , "Outstandin g Property Casualty Policies", "Please Review the Following Outstanding Policies", False
rst.MoveNext
Loop
SetWarnings = True
End If
End Sub
Denburt 1,356
Recognized Expert Top Contributor
What does this dialog box say exactly?
microsoft office outlook
a program is try to automatically send e-mail on your behalf. do you want to allow this? etc
Actually even if I say "NO" it still happens. So NO is not stopping the fax from process.
MMcCarthy 14,534
Recognized Expert Moderator MVP
microsoft office outlook
a program is try to automatically send e-mail on your behalf. do you want to allow this? etc
Actually even if I say "NO" it still happens. So NO is not stopping the fax from process.
This is a standard outlook warning that can be turned off if you have admin privilages.
This is a standard outlook warning that can be turned off if you have admin privilages.
i do have admin privilages, so how do I turn it off.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Prosonman |
last post by:
Hi,
What is the best way to transfer variables to and from a dialog box? My
project consists of a form with a number of controls, lets say three Labels,
when a label is clicked it opens a dialog box with a text box in it and the
text box data will be returned to the label that was clicked. Don't laugh
but this is the code I use, it's OK for three controls but gets complicated
when using alot of controls and although it works I think its...
|
by: George |
last post by:
Is there a way to customize the open file common dialog? I am trying to
modify the button text so I can create a delete file common dialog. I need
the same functionality of the open file common dialog but just need to
change the button text from "open" to "delete". Any ideas?
Thanks
|
by: Carmine |
last post by:
I'm currently writing a small program that churns on a repetitive task
while displaying a progress & cancel modeless dialog. I've been having
problems due to threadlocking, and I was wondering if anyone could
give me some advice.
Basically when I create the modeless dialog, I'm assuming that C#
under the covers will be implicitly creating a new thread for the
modeless dialog's message pump. Thus I protect the state determiners
with a...
|
by: Alexander |
last post by:
Hi, I have written a program that takes on some operations much more
time than I expected. As I have seen users clicking wildly on the
screen to make something happen, I want to follow the microsoft
principles: always show them something ;)
First I made up a little status dialog containing a gif image to show
a little animation and a TextBox for a changing status message during
the work of the main program.
Just showing the dialog box...
|
by: bryanhobson |
last post by:
I'm fairly new to c#, and I am just trying to work out how a
'properties' dialog works.
Currently in my code, I have an object represented by the class 'Dog'.
The dog object has several properties.
I have added a new windows form, class 'DogProperties'. I'm attempting
to use this to allow the user to edit the properties of an instance of
'Dog'.
| |
by: ronenk |
last post by:
I have this code to load an authentication form once my app is loaded.
I want the authentication form to be closed if a user is authenticated
successfully and to give the option to close app on his decision.
private void MainForm_Activated(object sender, EventArgs e)
{
AuthFrm StartUpfrm = new AuthFrm();
if (StartUpfrm.ShowDialog() == DialogResult.OK)
|
by: Guadala Harry |
last post by:
I have a modal dialog that currently does all of the following except item
4.
1. lets users select a graphic from a list of thumbnails (and when selected,
displays the full-size image in a preview DIV)
2. when users close the dialog, the application receives the URL to the
selected graphic.
3. the modal dialog lets the users upload a new graphic if the dialog does
not present them with one they are already happy with.
4. upon uploading...
|
by: Zytan |
last post by:
I have created a new form from the main form. When I close the main
form with the 'x' close button, its Form.FormClosed event is run, but
not the dialog's.
Is this normal? It is ok / dangerous? How can I force shutdown code
within the dialog's Form.FormClosed event run?
Zytan
|
by: Moezzie |
last post by:
So ive got a bit of a problem here. Ive been searching the net about this for quite some time now but i just cant seem to figure out how to open a dialog that ive made in QtDesigner.
Of corse i used pyuic4 to make it into python code.
This is the code for my dialog window(it contains just a TextEdit and a LineEdit):
from PyQt4 import QtCore, QtGui
class Ui_Dialog(object):
def setupUi(self, Dialog):
...
|
by: VK |
last post by:
In the continuation of the discussion at "Making Site Opaque -- This
Strategy Feasible?" and my comment at
http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2
I have realized that despite suggestions to use DHTML-based modal
dialogs are very common? there is not a single fully functional
reliable copyright-free cross-browser alternative to say MsgBox
(VBScript) or showModalDialog (IE). This way such suggestions up to...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |