UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Code Almost Finished, Can't Get Proper Btns To Show In Msgbox    
 
   
David92595
post Jul 8 2011, 01:06 PM
Post #1

UtterAccess Addict
Posts: 247



I am trying to write a script so that when two text boxes from different forms are compared, if they are not equal a msgbox pops up and give two btns Yes and Calcel.

So when "If Forms![Main Details]!TS <> Forms![AZ Fees & Costs]!TS = True" a msg box appears with a yes btn and a cancel btn. The yes btn I need to open a blank form, which I believe I already have writen code for. As of right now the only btn I get is "Okay" and then I can't have the btn do any action.

Code:

Private Sub Command152_Click()
On Error GoTo Command152_Click_Err

If State = "AZ" Then
DoCmd.OpenForm "AZ Fees & Costs"
DoCmd.RunMacro "Find_on_click_TS2"

If Forms![Main Details]!TS <> Forms![AZ Fees & Costs]!TS = True Then
Select Case MsgBox("TS# is not in Fees & Costs, would you like to add it now?" _
& vbYesCalcel)
Case vbYes
DoCmd.OpenForm "AZ Fees & Costs"
DoCmd.GoToRecord , , acNewRec
Case vbCalcel
'Do Nothing
End Select

End If
Go to the top of the page
 
+

Posts in this topic


Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 04:40 PM