Welcome to SPN

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

Sign Up Now!

need help

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

Tags:
  1. Chey

    Chey
    Expand Collapse
    Guest

    I have a form
    When I open it if TA Number is null, the I want a message box to appear, no
    travels to approve. And then an okay to click on to close the form.

    Can someone please help me with this?
     
  2. Loading...

    Similar Threads Forum Date
    Interracial And Interfaith Marriage, Help Needed To Confront/convince My Parents Love & Marriage Aug 16, 2016
    17 yr old Baljit needs your help Get Involved Aug 19, 2015
    Learn Punjabi Need help Language, Arts & Culture May 20, 2014
    United Sikhs From United Sikhs. Phillippines Needs Your Help Sikh Organisations Nov 22, 2013
    Need Help... (Keeping Hair) Questions and Answers Sep 2, 2013

  3. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Try in the Form_Open Event

    Sub Form_Open(Cancel As Integer)
    Dim Rs As DAO.Recordset
    Set Rs = Me.RecordsetClone
    Cancel = Rs.BOF And Rs.EOF
    Set Rs = Nothing
    If Cancel Then
    MsgBox "Go home, everything is done <g>", vbCritical, "We're out of
    business"
    End If
    Exit Sub

    HTH

    Pieter

    "Chey" <Chey@discussions.microsoft.com> wrote in message
    news:367BFBAA-953F-43FA-B8B0-7C6BA3298B2E@microsoft.com...
    >I have a form
    > When I open it if TA Number is null, the I want a message box to appear,
    > no
    > travels to approve. And then an okay to click on to close the form.
    >
    > Can someone please help me with this?
     
  4. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Try in the Form_Open Event

    Sub Form_Open(Cancel As Integer)
    Dim Rs As DAO.Recordset
    Set Rs = Me.RecordsetClone
    Cancel = Rs.BOF And Rs.EOF
    Set Rs = Nothing
    If Cancel Then
    MsgBox "Go home, everything is done <g>", vbCritical, "We're out of
    business"
    End If
    Exit Sub

    HTH

    Pieter

    "Chey" <Chey@discussions.microsoft.com> wrote in message
    news:367BFBAA-953F-43FA-B8B0-7C6BA3298B2E@microsoft.com...
    >I have a form
    > When I open it if TA Number is null, the I want a message box to appear,
    > no
    > travels to approve. And then an okay to click on to close the form.
    >
    > Can someone please help me with this?




    --
    ----------------------------------------
    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
     
  5. Al Camp

    Al Camp
    Expand Collapse
    Guest

    Chey,
    Assuming [TA] is on the Main form... use the Main form Current event...

    Private Sub Form_Current()
    Dim Response as Variant, Prompt as String
    Prompt = "No Travels to Approve"
    If IsNull([TA]) Then
    Response = MsgBox Prompt, vbOKonly
    DoCmd.Close
    End If
    --
    hth
    Al Camp
    Candia Computer Consulting - Candia NH
    http://home.comcast.net/~cccsolutions
    There are 10 types of people in the world.
    Those who understand binary, and those who don't.


    "Chey" <Chey@discussions.microsoft.com> wrote in message
    news:367BFBAA-953F-43FA-B8B0-7C6BA3298B2E@microsoft.com...
    >I have a form
    > When I open it if TA Number is null, the I want a message box to appear, no
    > travels to approve. And then an okay to click on to close the form.
    >
    > Can someone please help me with this?
     

Share This Page