Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 5th, 2011, 12:53 PM
Authorized User
 
Join Date: Jun 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Question Need Help sending Msgbox if two variables are <>

Hello,
I need to compare two numbers from separate parts (different tables) of the DB. If the numbers are not equal, I need to send a Message box with a button in it to create new record in the one of the tables.

Here is the code I has so far...but it needs some work.

Private Sub Command152_Click()
On Error GoTo Command152_Click_Err

If State = "AZ" Then
DoCmd.OpenForm "AZ Fees & Costs" 'open Form
DoCmd.RunMacro "Find_on_click_TS2" 'search for a_ TS#\(ID#) and bring up the info
ElseIf "Form.AZ Fees & Costs.TS" <> "Macroload.Find_on_click_TS2" Then
MsgBox "No Fees & Costs Exist for this TS #" ‘(+ button that will create new record in Form.CA Fees & Costs.TS")



ElseIf State = "CA" Then
DoCmd.OpenForm "CA Fees & Costs" 'open Form
DoCmd.RunMacro "Find_on_click_TS2" 'search for a_ TS#\(ID#) and bring up the info
ElseIf "Form.CA Fees & Costs.TS" <> "Macroload.Find_on_click_TS2" Then
MsgBox "No Fees & Costs Exist for this TS # ‘(+ button that will create new record in Form.CA Fees & Costs.TS")


Else
MsgBox "State Unknown"
End If

Command152_Click_Exit:
Exit Sub

Command152_Click_Err:
MsgBox Error$
Resume Command152_Click_Exit

End Sub

Thank you in advance,
David92595
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM
using variables within <td> tags handyman Javascript How-To 3 June 15th, 2004 11:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.