Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Revise code

Discussion in 'Information Technology' started by Chey, Jul 28, 2006.

Tags:
  1. Chey

    Chey
    Expand Collapse
    Guest

    I have this code
    Private Sub Form_Open(Cancel As Integer)
    Dim strMsg As String
    If (Nz(Me.[TA Number], "") = "") Then
    strMsg = "No Travels to Approve."
    If MsgBox(strMsg, vbRetryCancel + vbExlcamation, "Incomplete Data")
    = vbRetry Then
    Me.[TA Number].SetFocus
    Exit Sub
    Else
    Me.Undo
    DoCmd.Close acForm, Me.Name, acSaveNo
    Exit Sub
    End If
    End If
    DoCmd.OpenForm "Appoved"
    End Sub

    Instead of it saying retry cancel. Can I have it say go to approval or okay?

    This will make more sense to the person operating it.
    Thanks
    Chey
     
  2. Loading...

    Similar Threads Forum Date
    Sikh Coalition Revised Sikh Air Traveler's Guide (Please read) Sikh Organisations Jan 14, 2011
    Legal Wheter Centre should revise Article 311 of the Constitution to rationalize laws to enforce transpare Breaking News Mar 15, 2010
    Sikh News Revised pay scales attracting youth to Army Breaking News Aug 2, 2009
    Sikh News Recommend Punjab case on revised norm: Badal (Express India) Breaking News Aug 26, 2008
    Sikh News Punjab urges revised norms for flood relief (Calcutta News) Breaking News Aug 26, 2008

  3. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    no, but you can use vbYesNo & test for vbYes instead
    Also revise the text in accordance
    it should also suffice to use:
    If IsNull(Me.[TA Number].Value Then
    instead of the Nz in this case

    Pieter
    And your question was more understandable this time <g>

    "Chey" <Chey@discussions.microsoft.com> wrote in message
    news:E9FAEBD2-0385-4956-B6D4-E521CD02B229@microsoft.com...
    >I have this code
    > Private Sub Form_Open(Cancel As Integer)
    > Dim strMsg As String
    > If (Nz(Me.[TA Number], "") = "") Then
    > strMsg = "No Travels to Approve."
    > If MsgBox(strMsg, vbRetryCancel + vbExlcamation, "Incomplete Data")
    > = vbRetry Then
    > Me.[TA Number].SetFocus
    > Exit Sub
    > Else
    > Me.Undo
    > DoCmd.Close acForm, Me.Name, acSaveNo
    > Exit Sub
    > End If
    > End If
    > DoCmd.OpenForm "Appoved"
    > End Sub
    >
    > Instead of it saying retry cancel. Can I have it say go to approval or
    > okay?
    >
    > This will make more sense to the person operating it.
    > Thanks
    > Chey
     
  4. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    no, but you can use vbYesNo & test for vbYes instead
    Also revise the text in accordance
    it should also suffice to use:
    If IsNull(Me.[TA Number].Value Then
    instead of the Nz in this case

    Pieter
    And your question was more understandable this time <g>

    "Chey" <Chey@discussions.microsoft.com> wrote in message
    news:E9FAEBD2-0385-4956-B6D4-E521CD02B229@microsoft.com...
    >I have this code
    > Private Sub Form_Open(Cancel As Integer)
    > Dim strMsg As String
    > If (Nz(Me.[TA Number], "") = "") Then
    > strMsg = "No Travels to Approve."
    > If MsgBox(strMsg, vbRetryCancel + vbExlcamation, "Incomplete Data")
    > = vbRetry Then
    > Me.[TA Number].SetFocus
    > Exit Sub
    > Else
    > Me.Undo
    > DoCmd.Close acForm, Me.Name, acSaveNo
    > Exit Sub
    > End If
    > End If
    > DoCmd.OpenForm "Appoved"
    > End Sub
    >
    > Instead of it saying retry cancel. Can I have it say go to approval or
    > okay?
    >
    > This will make more sense to the person operating it.
    > Thanks
    > Chey




    --
    ----------------------------------------
    I am using the free version of SPAMfighter for private users.
    It has removed 4367 spam emails to date.
    Paying users do not have this message in their emails.
    Get the free SPAMfighter here: http://www.spamfighter.com/len
     

Share This Page