Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332

    Quote Originally Posted by wmpwi View Post
    The code for this application was written over 10 years ago by someone long since retired. The suggestions offered by Xipooo, ItsMe, and ssanfu are very helpful and I'm trying, but to the novice, looking at someone else's work seem like trying to untangle some seriously messed up fishing line. In the mean time, I've come up w/ a workaround by taking an existing working form (the sign-out form) and peeling away everything I can until I arrive at something close to the sign-in form (that doesn't work). Comparing the two is also helping me understand some of what's going, but it's a process. Thanks for the help and I'll keep gnawing at it.
    Ahh yes, the always absent "other guy" who mangled up the thing in the first place. If they ever catch that guy there will be a lynch mob banging on the jailhouse door.

  2. #17
    wmpwi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    13
    Quote Originally Posted by Xipooo View Post
    Ahh yes, the always absent "other guy" who mangled up the thing in the first place. If they ever catch that guy there will be a lynch mob banging on the jailhouse door.
    Well, in his defense, how many Access apps with over 100 users written 10+ years ago are still working strong. You and I wouldn't be having this conversation if he (or anyone else that knew how to fix it) were within arms reach. As much as I'd love to solve this riddle, my biggest fear is someone will notice that I f#@ked something up like 'Oh, you have the CapsLock on. In my case (at work anyway) it's 'In the land of the blind, the one-eyed man is king.'

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    If you want to provide db for analysis, follow instructions at bottom of my post.

    The only thing unusual I see in the code is using Text property. Why Text? Value is the default property for data controls and doesn't have to be typed.

    Don't think I've ever used Text property.

    Don't understand need for the timer in Load event.


    I also always name controls different from the fields.

    I have successfully set Value of field and control in Open event. Examples:

    Me!Remark1 = "See attached one dimensional consolidation Report."

    Me.cbxLabNum = Me.OpenArgs

    But could try Current event instead of Open.

    Maybe the form is corrupted. I see you are trying to rebuild. Any luck?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    wmpwi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    13
    Quote Originally Posted by June7 View Post
    If you want to provide db for analysis, follow instructions at bottom of my post.
    That's the part of your reply I understood.
    The rest not so much.
    If you're good with it, I'll try to take you up on your offer.
    Also, feel free to correct whatever annoys you.
    I'll try to get it to you tomorrow.
    Thanks.

  5. #20
    wmpwi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    13
    This is the application minus any irrelevant data, but including all the application elements. I think there are probably several objects, forms, or scripts, or what have you that have no function, but I'm reluctant to delete or modify anything I don't fully understand which is kind of all of it. Thanks for looking under the hood and I'm here all day.
    Attached Files Attached Files

  6. #21
    wmpwi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    13
    Quote Originally Posted by June7 View Post
    If you want to provide db for analysis, follow instructions at bottom of my post.
    Maybe the form is corrupted. I see you are trying to rebuild. Any luck?
    I took a working form and tried to pull out everything that wasn't necessary or distracting and the 'new' form now allows me edit the appropriate fields that were being automatically zeroed out by the now non-working form, but it's quite a bit less elegant than the way the earlier form had worked when it all that was required was entering the employee ID and it did the rest. I have attached the DB in my earlier post, but it was Friday and may have gone unnoticed. Thanks for looking.

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Here is what I did.

    1. rename the SignInForm to SignInFormOLD or just delete it now instead of later

    2. copy the SignOutForm and name the copy to SignInForm

    3. eliminate unneeded controls from the new SignInForm, and fix the InOut textbox (probably easiest to delete and create new one)

    4. delete the Enter Time and Enter Date buttons and their code from the new form

    5. delete the ExtRetDate_BeforeUpdate procedure from the new form

    6. delete irrelevant code from the Close button procedure of the new form and fix code
    DoCmd.Close acForm, "SignInForm", acSaveNo

    7. delete the extended absence label from the footer

    8. Modify the Open event code of the new form. It is not necessary to set focus to a control just to populate it by code. Your code is setting textboxes to empty string ("") but the table is set to not allow empty (zero length) strings into the table. Set the fields to Null instead of "". Why are these fields being set to empty anyway?
    Code:
    Private Sub Form_Open(Cancel As Integer)
    On Error GoTo Form_Open_Err
    Dim Message, Title As String
    Message = "Enter your caseload number."
    Title = "Set Filter for SignOut Screen."
    AgentNumber = InputBox(Message, Title)
              
    Me.Filter = "[AgentNum] = '" & AgentNumber & "'"
    Me.FilterOn = True
    InOut = "In"
    Notes = Null
    Notes.SetFocus
    
    Exit_Form_Open:
        Exit Sub
    Form_Open_Err:
        MsgBox "Error,  " & Err.Description & " You entered a number that does not exist"
        Me.Undo
        DoCmd.Close acForm, "SignOutForm", acSaveNo
        Exit Sub
    End Sub


    BTW, recommend no spaces or special characters/punctuation (underscore is exception) in naming convention.
    Last edited by June7; 02-25-2014 at 12:47 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #23
    wmpwi is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    13
    Thanks for working through it. I'm unable to do anything with it tonight as I'm on a 64-bit at home which seems to piss it off. I will be making the adjustments tomorrow a work if I can and get back w/ you then. Thanks again.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 02-11-2014, 09:41 AM
  2. Replies: 15
    Last Post: 07-17-2013, 11:29 AM
  3. Type mismatch Error after upgrading to Access 2010
    By twm07073 in forum Programming
    Replies: 7
    Last Post: 06-13-2012, 10:07 AM
  4. 2113 Error happening from Access 2003 to 2010
    By johnnyflames in forum Forms
    Replies: 5
    Last Post: 06-08-2012, 01:42 PM
  5. Error after upgrading to Access 2007
    By bmcclellan in forum Queries
    Replies: 9
    Last Post: 03-22-2010, 10:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums