User Profile

Collapse

Profile Sidebar

Collapse
Megalog
Megalog
Last Activity: Jun 1 '16, 07:14 PM
Joined: Sep 12 '07
Location: Neenah, WI USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Confirmed on separate systems running 2007 and 2010.
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Find old files and delete them
    I really dislike parsing text to extract dates from filenames, when you can use FSO to retrieve the actual dates saved or modified!

    Here's what I use to retrieve that metadata:

    Code:
    Option Explicit
    
    Public Function GetDateCreated(strFileName As String) As Date
    
        Dim oFSO As Object
        Set oFSO = CreateObject("Scripting.FileSystemObject")
        GetDateCreated = oFSO.getfile(strFileName).DateCreated
    ...
    See more | Go to post
    Last edited by Megalog; Jul 26 '12, 04:29 PM. Reason: Clarification

    Leave a comment:


  • After all the checks and measures are done, and the user logging is complete, I believe all it does is:

    Code:
    DoCmd.RunCommand acCmdSave
    DoCmd.Quit
    See more | Go to post

    Leave a comment:


  • Twinny,
    Sadly, I dont have an easy copy/paste code solution to provide for this. I posted my basic approach at the beginning of this thread, and you should use this as a roadmap to your custom approach. It will involve the use of a hidden form with a timer, a small table to store the login/logout information, and basic code to save & close access.
    If you get stuck on any specific steps, leave a detailed post and I'll try to provide...
    See more | Go to post

    Leave a comment:


  • Since none of your users are running Access 2003 or older, why not try converting the master .mdb to the newer .accdb format? Then distribute the replicas as .accde files and see how it handles it.
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Run time Error 3075
    I'm guessing "Customer_Numbe r" might actually be a string value? Try:

    Code:
    TOP50_Navn = DLookup("[TOP50_Navn]", "InternKundeMappingFil", "[Customer_Number] = '" & Customer_Number & "'")
    Or maybe your variables arent declared correctly, and you need something like this:
    Code:
    TOP50_Navn = DLookup("[TOP50_Navn]", "InternKundeMappingFil", "Customer_Number="
    ...
    See more | Go to post

    Leave a comment:


  • FitCombo function

    With some easy modification, you can change the width of the drop-down window, without changing the control's size.

    See the attached database for an example form with two combo boxes. One is standard, one is modified to fit it's content. The modified combo box has a function call when you enter the control, that resizes it's content.

    If you have any questions let me know. I use this...
    See more | Go to post

    Leave a comment:


  • If you're trying to read it off the form (using the current record), you can bring back the full value of the multivalue field using the 'text' property.

    For example:
    Code:
    [Forms]![frmTest]![MValues].Text
    You could then just test to see if that string is empty and move on.

    Edit:
    I forgot, that this method requires the form control to have the active focus. Probably why I dont use this method....
    See more | Go to post
    Last edited by Megalog; Mar 15 '11, 04:54 PM. Reason: Oops?

    Leave a comment:


  • Megalog
    replied to Why does DLookup not work in Windows 7?
    Try replacing + with &, you're adding the values together instead of appending string values.

    Code:
    =DLookUp("[Lastname]","Client Information","[Client ID]=[Forms]![Amount Form]![Client ID]") & ", " & DLookUp("[Firstname]","Client Information","[Client ID]=[Forms]![Amount Form]![Client ID]")
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Making label control flash
    Exactly how it works. "Me.lblLocked.V isible = Not Me.lblLocked.Vi sible" works by taking the current .visible value and applying the opposite. Thus each time the timer event activates it is toggling it on and off for as many times as it's allowed before it permanently stays visible....
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Making label control flash
    The timer handles the frequency of the event. The lngCount value determines what happens in the event.

    This line simply toggles the .Visible property by assigning it's opposite value to it:

    Code:
    Me.lblLocked.Visible = Not Me.lblLocked.Visible
    If you want it to flash more, then the first line can be increased to a higher number like:
    Code:
    If lngCount < 12 Then
    Everytime the lists get...
    See more | Go to post

    Leave a comment:


  • You can also easily accomplish this with conditional formatting, assuming you dont have too many different criteria/colors to assign. Look for the 'Conditional' button under the Font Group, in the 'Format' tab.
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to AutoExec Not Loading Ribbon
    Excellent, thanks for posting a good working solution. Will be stealing this for my code archive right now =)
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Making label control flash
    Code:
    Option Compare Database
    Option Explicit
    
    Public lngCount As Long
    
    'The AfterUpdate events from whatever control you 
    'want this to activate on. Duplicate this for each 
    'combo/list control
    
    Private Sub cbo1_AfterUpdate()
        Call CheckLists
    End Sub
    
    Private Sub cbo2_AfterUpdate()
        Call CheckLists
    End Sub
    
    
    Private Sub CheckLists()
    ...
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to AutoExec Not Loading Ribbon
    I've never had any luck implementing a ribbon through code.. My db is always picky and wants it to be called from a table.

    But, everything looks in order except that the Ribbon tag may not be closed right.

    Try:

    Code:
        strXML = "<customUI xmlns=""http://schemas.microsoft.com/office/2006/01/customui"">" _ 
            & "<ribbon startFromScratch=""true""></ribbon></customUI>"
    See more | Go to post

    Leave a comment:


  • Controls are Stacked by default on a form.

    What I usually do is select the controls I know are going to be the same size. I unstack that selection (disconnecting them from the original stack), and size them appropriately. Then select the next group of fields, unstack, resize. Repeat until all fields are unstacked.

    Then arrange your fields where you want them to be. If they are the same size, you can always re-Stack...
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to How to filter Form Using Several Comboboxes
    Not sure if this is cleaner or more efficient, but it may be easier to modify down the road if you need to drop another filter box onto the form.

    Code:
    Dim strFilter As String
    
    If Me.cboFilterMatricYT <> 0 Then
        strFilter = "DegReq.MatricId = " & Me.cboFilterMatricYT
    End If
    
    If Me.cboFilterCollege <> 0 Then
        If strFilter = "" Then
            strFilter
    ...
    See more | Go to post

    Leave a comment:


  • If OrderID is purely numeric Then use:
    Code:
    =DLookUp("[SumOfHours]","qryHoursPerOrder","[OrderID] = " & [OrderID])
    Else
    Code:
    =DLookUp("[SumOfHours]","qryHoursPerOrder","[OrderID] = '" & [OrderID] & "'")
    End Help
    See more | Go to post

    Leave a comment:


  • If it's running but nothing happens then it's probably failing on the match.
    Code:
            Call .FindFirst("[Order_Num]='" & Me.ORDER_NUM & "'")
    Put stops in the code on this line and after to see if it's passing through
    Code:
            If (Not .NoMatch) _
    See more | Go to post

    Leave a comment:


  • Megalog
    replied to Form.Filter Syntax
    You're welcome Matt, glad we got all your issues resolved. Learning how to deal with empty strings and/or null values can be aggravating sometimes.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...