A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Two message boxes



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old November 13th, 2009, 05:04 PM posted to microsoft.public.access.forms
Rockn[_2_]
external usenet poster
 
Posts: 5
Default Two message boxes

I have two message boxes that fire off when I am going to print a report to
determine what will show up on the report as far as fields. The first
message box is to hide the customer price on a quote, if you answer yes it
sets a checkbox on the initial form to true. The next message box is to show
or hide the changes made to the quote on the report. If I say vbyes to both
of the message boxes the customer pricing will not be hidden as the checkbox
is getting set back to false. I am not sure why it is toggling, but it works
if I answer yes to the first and no to hte second. It may just be the order
in which the events are happening or the initial state of the checkbox. Code
below:

Case 1

If IsNull(Me.[Text147]) And IsNull(Me.[Text133]) Then
rptType = "rpt_CustomerCopy"
End If
If IsNull(Me.[Text147]) And Not (IsNull(Me.Text133)) Then
rptType = "rpt_CustomerCopyDisc"
End If
If Not (IsNull(Me.Text147)) And IsNull(Me.[Text133]) Then
rptType = "rpt_CustomerCopyAdd"
End If
If Not (IsNull(Me.Text147)) And Not (IsNull(Me.[Text133])) Then
rptType = "rpt_CustomerCopyBoth"
End If

HideCost = MsgBox("Hide Homeowner Cost?", vbYesNo, "Hide Cost")
If HideCost = vbYes Then
Me.Check161.Value = True
End If
If HideCost = vbNo Then
Me.Check161.Value = False
End If


LResponse = MsgBox("Show Changes on Report?", vbYesNo, "Print Changes?")
DoCmd.OpenReport rptType, acPreview, , "[JOB_ID]= " & Me.[JOB_ID]
If LResponse = vbYes Then
Reports(rptType).Report!rpt_Change.Visible = True
End If

DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.