Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Function problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
niclive@gmail.com - 22 May 2007 09:41 GMT
Please help.I am new to VBA.
I want to create a public function and embed it in my startup splash
form that quits the application if date() > mydate unless a user puts
in a value(input box in the function will take this value and assign
it to a variable).
Please help.
Stefan Hoffmann - 22 May 2007 10:09 GMT
hi,

> Please help.I am new to VBA.
> I want to create a public function and embed it in my startup splash
> form that quits the application if date() > mydate unless a user puts
> in a value(input box in the function will take this value and assign
> it to a variable).

  Public Sub Quit(ADate As Date)

    On Local Error GoTo LocalError

    If ADate < Date() Then
       If Len(Trim(Nz(txtInput.Value, ""))) = 0 Then
          DoCmd.Quit acSavePrompt
       End If
    End If

    Exit Sub

  LocalError:
    MsgBox Err.Description & "; Err#:" & Err.Number

  End Sub

mfG
--> stefan <--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.