Function to validate a Start and End date

*****Function to validate a Start and End date *****   This function is to make sure the information entered on these fields is a Date format and also to ensure the Ending Date is greater than or equal to the Starting Date. You should have two text boxes or two fields with a data type as Date/Time for the Start Date and End Date. Name two fields as StartDate for the Starting Date EndDate for the Ending Date call this function on the After Update Event of the EndDate as…

Read More

Function Get User Login Fullname from Network

  Function GetFullName() Dim WSHnet, objUser, UserName, UserDomain     Set WSHnet = CreateObject(“WScript.Network”)    UserName = WSHnet.UserName    UserDomain = WSHnet.UserDomain    Set objUser = GetObject(“WinNT://” & UserDomain & “/” & UserName & “,user”)    GetFullName = objUser.FullName End Function =================================== Dim mySQL As String Dim myUserName, myPC   Get UserID logged in myUserName = Environ$(“username”)   Get PC name for User logged in myPC = Environ$(“computername”) The other physical causes include high BP, diabetes, excessive consumption of alcohol, smoking and tobacco use. cialis pfizer achat http://greyandgrey.com/spanish/compensacion-para-los-trabajadores/ Most schools Continue…

Read More

VBA Export Data to Text File

Function Export data to text file Sub ExportToTextFile(strType As String, Strprogram As String)    Dim str1 As String, strPath As String, I As Integer    Dim User As String    Dim LogInTime As Date    ‘Dim LogOutTime As Date     User = Environ(“username”)      ‘strPath = CurrentProject.path      strPath = “H:\Public\”    Close #1           ‘–make sure no open handles to text file    Open strPath & “\txtExportTo.txt” For Append As #1        str1 = User        LogInTime = Now()        str1 = str1 & “,” & LogInTime & “, ”…

Read More

Create Spelling Check

Private Sub cmdSpellChk_Click() With Me!txtNote Me.txtNote.SetFocus If Len(.Value) > 0 Then DoCmd.SetWarnings False .SelStart = 1 .SelLength = Len(.Value) DoCmd.RunCommand acCmdSpelling .SelLength = 0 DoCmd.SetWarnings True End If End With End Sub See How To Millions of men around the world have seen the magic of this medicine cialis professional for sale and they are to be learnt effectively. One thing to be careful while cialis online taking the medication. Keep in mind that the shoulder blades, buttocks, middle back and the shoulder blades need to be kept flat on…

Read More

Function SelectFile from filedialog

Function SelectFile from filedialog Put this function in the Modules of your access file Need textbox names text0 Need listbox names List3 Need button names Command2     Public Function Selectfile() As String Dim Fd As FileDialog Set Fd = Application.FileDialog(msoFileDialogOpen) With Fd .AllowMultiSelect = False .Title = ” Please select file” If .Show = True Then Selectfile = .SelectedItems(1) Me.Text0 = Selectfile Me.List3.AddItem (Selectfile) Else Exit Function End If Set Fd = Nothing End With End Function Call function on click command to open select from Private Sub Command2_Click()…

Read More

Function Set Properties() MS Access

Function Set Properties() Put these three functions in the Module of Access 1) Function SetProperties() Public Function SetProperties(PropName As String, PropType As Variant, PropValue As Variant) As Integer On Error GoTo Err_SetProperties    Dim db As Database, prop As Property    ‘Dim db As DAO.Database, prop As DAO.Property (use in the old version prior 2007)    Set db = CurrentDb    db.Properties(PropName) = PropValue    SetProperties = True    Set db = Nothing Exit_SetProperties: Exit Function Err_SetProperties:    If Err = 3270 Then ‘case of property not found        Set…

Read More

Function Send Email via Outlook from Access

Function Send email via Outlook Put this function in the form       Sub SendEmail() Dim oOutlook As Outlook.Application Dim oEmailItem As MailItem ‘ prevent 429 error, if outlook not open On Error Resume Next Err.Clear Set oOutlook = GetObject(, “Outlook.application”) If Err.number <> 0 Then At a superficial glance, cialis 20 mg appalachianmagazine.com may seem like a sideshow attraction, but it has been verified to show damaging unintended effects. Many people feel that they are the victims of this sort of situation then the best would be to…

Read More