• WSJim Bulger

    WSJim Bulger

    @wsjim-bulger

    Viewing 15 replies - 16 through 30 (of 34 total)
    Author
    Replies
    • in reply to: Single form/multiple users #519062

      or he could pass the teacherid in the openargs parameter

    • in reply to: Export Database as Time/Date #518781

      I was trying to hold out on you, but….

      FileCopy varOriginationMDB, varDestinationMDB

      or

      FileCopy varOriginationMDB, varDestinationLocation & “” & format(“yyyy-dd-mm”,Date()) & “.mdb”

      both should work

      Good luck

    • in reply to: .LDB Bummer #518767

      Just because it is networked is no reason for concern. What is of concern is how everyone access it. Is the db split into front-end/back-end or is everyone using the SAME .mdb? Exactly what is being corrupted?

    • in reply to: Export Database as Time/Date #518765

      The easiest would be, (in access) run a shell command such as the following:
      Shell “c:program fileswinzipwinzip32.exe -min -a ” & fullPathAndFilenameToCreate & ” ” & fullPathAndFilenameToZip
      which would create a.zip file containing the .mdb and name it whatever name you assign to the fullPathAndFilenameToCreate variable
      This assumes you have a liscenced copy of winzip in the difined location

    • in reply to: Export Database as Time/Date #518755

      Just a thought.

      Just prior to the Application.Quit, (using code, of course) open up another .mdb file which would contain the copydb code. You can then fire the code in the open event of the startup form (or autoexec macro, if you must). Be sure to check for the abscence of the matching .ldb to ensure noone else is using the mdb (thereby possibly losing data among other problems)

    • in reply to: VB ? #518732

      This may work well as you say, but this code realy belongs behind the form and not in a separate module. The reasoning behind my statement is that you are explicitly saying that only the form “fProjectInfo” can ever be used. If you pass the VALUE of Forms!fProjectInfo!cboPM.Column(0) in your function call, then it would be useful for more than just one form.

      Public Function Open_Log(obj As Object, strEmail as string)
      Dim db As Database
      Dim rsLog As Recordset

      Set db = CurrentDb()
      Set rsLog = db.OpenRecordset(“tReortLog”)
      With rsLog
      .AddNew
      .Fields(“WhatReport”) = obj.Name ‘or whatever your field name is
      .Fields(“PM”) = strEmail
      .Update
      .Close
      End With
      Set rsLog = Nothing
      Set db = Nothing
      End Function

    • in reply to: VB ? #518660

      since the report specified is held in a variable, try something like this:

      .fields(“PM”)=reports(obj).PM

      (although this will only work if every report passed has the same object (i.e. “PM”) on it)

      a better alternative would be to pass two parameters to the function. The report name and the object name

    • in reply to: Is this user in this group? #518448

      All I would end up doing is giving away their code which is pretty unethical. their code is free to use as long as you purchase their book or find it published in one of their many articles in periodicals or on the web. Sorry, but maybe someone else wrote a custom module they will post for you

    • in reply to: Is this user in this group? #518443

      If you have the Acees Developers Handbook by Gilbert, Getz & Litwin, you would already have that. If you don’t have the book, I would HIGHLY recommend purchasing it.

    • in reply to: containers,collections,objects #1779877

      What do you mean by ‘set the ‘Source’ property of an existing form to an arbitrary value’? Are you referring to the RECORDSOURCE?

    • in reply to: ODBC Linked/Imported Tables #518025

      assuming you are using code to connet the table links, try using an if statement such as:

      IF table.name like ‘MDATAP*’ then
      ‘**place your connection code here
      END IF

    • in reply to: Inserting data into a table #518021

      docmd.setwarnings false
      DoCmd.RunSQL “INSERT INTO PersonalAdvices (xxx, yyy, zzz) VALUES (xxx, yyy, zzz)” , A_NEWREC
      docmd.setwarnings true

    • in reply to: Select Folder #1779839

      paste the followinig into a new module. It does exactly what you are looking for

      Option Compare Database
      Option Explicit

      ‘************** Code Start **************
      ‘This code was originally written by Terry Kreft.
      ‘It is not to be altered or distributed,
      ‘except as part of an application.
      ‘You are free to use it in any application,
      ‘provided the copyright notice is left unchanged.

      ‘Code courtesy of
      ‘Terry Kreft

      Private Type BROWSEINFO
      hOwner As Long
      pidlRoot As Long
      pszDisplayName As String
      lpszTitle As String
      ulFlags As Long
      lpfn As Long
      lParam As Long
      iImage As Long
      End Type

      Private Declare Function SHGetPathFromIDList Lib “shell32.dll” Alias _
      “SHGetPathFromIDListA” (ByVal pidl As Long, _
      ByVal pszPath As String) As Long

      Private Declare Function SHBrowseForFolder Lib “shell32.dll” Alias _
      “SHBrowseForFolderA” (lpBrowseInfo As BROWSEINFO) _
      As Long

      Private Const BIF_RETURNONLYFSDIRS = &H1
      Public Function BrowseFolder(szDialogTitle As String) As String
      Dim X As Long, bi As BROWSEINFO, dwIList As Long
      Dim szPath As String, wPos As Integer

      With bi
      .hOwner = hWndAccessApp
      .lpszTitle = szDialogTitle
      .ulFlags = BIF_RETURNONLYFSDIRS
      End With

      dwIList = SHBrowseForFolder(bi)
      szPath = Space$(512)
      X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)

      If X Then
      wPos = InStr(szPath, Chr(0))
      BrowseFolder = Left$(szPath, wPos – 1)
      Else
      BrowseFolder = “”
      End If
      End Function

    • in reply to: Passing object variables #517919

      Exactly which step in your code is breaking? Have you set breakpoints and stepped though it? This will help you answer most of your questions.

    • in reply to: Mass Appending #517918

      you’re right. forgot.

    Viewing 15 replies - 16 through 30 (of 34 total)