Page 5 of 7 FirstFirst 1234567 LastLast
Results 61 to 75 of 93
  1. #61
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Yes, is defaulting to AttendanceID order. If you want a differnt sort order then define that in query or form OrderBy property.



    What do you mean by 'go crazy'? For me, just goes to new record row at end and first record at beginning. Macros working fine.
    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.

  2. #62
    smithpual71 is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    1


    Sent from my Z970 using Tapatalk

  3. #63
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Code:
    What do you mean by 'go crazy'?
    I mean the system, the db crashes.

    Respectfully,

    Lou Reed

  4. #64
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Code:
    This code will not allow moving to new record row. Do you need to allow new record entry?
    In post # 41 you asked that question. I do want to allow new record rows, but I am just not sure how to change this code to do it. Please elaborate on your answer.

    Respectfully,


    Lou Reed

  5. #65
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Well, that was a long time ago and I believe your db has undergone several reincarnations since. Not going to try and recall and recreate the situation that prompted that question.
    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.

  6. #66
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I will renumber the post if you want make it closer to the current post number.

    R,

    Lou Reed

  7. #67
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    How would you renumber post? That won't help me recall the situation. This thread has gone on far too long and the issue bludgeoned to death. You should have enough info to resolve the original question.
    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. #68
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, sorry to sound flippant. I was just anticipating tripping over the issue sometime in the future. So I want to protect myself.

    R,

    Lou Reed

  9. #69
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    In putting in this code, into my db, I ran into the usual problem of an undefined method.

    The code is for both the next and the previous buttons now shown :

    Code:
    Private Sub Back_Click()
    Me.RecordsetClone.MovePrevious
    If Not Me.RecordsetClone.BOF Then
        DoCmd.GoToRecord acForm, Me.Name, acPrevious
    Else
        Me.RecordsetClone.MoveFirst
        MsgBox "First record."
        Me.Back.Enabled = False
    End If
    Me.Foward.Enabled = True
    End Sub
    
    Private Sub Foward_Click()
    Me.RecordsetClone.MoveNext
    If Not Me.RecordsetClone.EOF Then
        DoCmd.GoToRecord acForm, Me.Name, acNext
    Else
        Me.RecordsetClone.MoveLast
        MsgBox "Last record."
        Me.Foward.Enabled = False
    End If
    Me.Back.Enabled = True
    End Sub
    When I press the next or previous buttons in frmEmail it fails in the same place. The screenshots of the code and its failure are shown
    in the attached two files. As is obvious from them the code fails in the exact same place on both Subs.

    I would like to know how to put in VBA code complete or whole. By that I mean that for now I click on the ellipsis
    in property sheet and it gives me the first and last lines of the sub. It chooses the names. So when I put in the code I put it all
    in and then delete the first and last lines of my code. This takes the recommendation of MS Access 2010 for sub names, but sometimes
    I want my own names, not ones that Access gives me by default. There must be a way to do this.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  10. #70
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, I got the first part of this question post #69. I know why it failed on method not found. I did not name it correctly in
    the code itself. Next should have been btnNext and Previous should have been btnPreviuos. I am still interested in how to put in the
    code without editing to take MS Access 2010's recommendations. I would still like to know how to do that.

    Respectfully,

    Lou Reed

  11. #71
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Either you change the name of the button or you change the code to agree with the name you already assigned the button.
    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.

  12. #72
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Is there any other way? I can't just put some code and then connect it to the button?

    Respectfully,

    Lou Reed

  13. #73
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    The procedure and the button are associated by name. If the names are different they can't find each other. There is no other way. One or the other must be edited until they are in agreement.

    If you create a button (or any control for that matter) and create code for it then later change the control name, you will have to modify the code. If you change the procedure declaration name and its code referencing the control by name, then must also change the control name.
    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.

  14. #74
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    In the file that is attached there is a db, that on frmEmail with a combo box that only lists a few emaployees (but actually lists one employee twice). Now the first that I want is to eliminate all blanks and how to get all empoyees listed. I believe that now I have nine.

    I know that eliminating blanks can be done using the SQL code: Not [fieldname] Is Null. I am not sure where it goes. The rowsource, I believe for that is taken by something else.

    Now regardless of that when I try to put in one of the employees that I choose, it make a chime sound and will not let me. Again, what is going on? As I said before all of the employees are clearly not listed.

    Also, I cannot change the MeetingID box. It is stuck on 2 , I believe.

    One thing about the frmEmail combo box. It was created before additional employees were added. I am not sure if that makes a difference.

    Any help appreciated with these questions. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  15. #75
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You have two Oliver Reed records in tblPersonnel. Maybe you should delete one? Then also delete associated records in tblAttendance. That will give you 8 employees.

    The employees combobox only lists employees that are not a branch head. If you want all employees then remove that criteria form the RowSource SQL statement.

    There are no blank rows in the combobox list. If you want to eliminate the blank columns, then change the combobox ColumnCount and ColumnWidths properties.
    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.

Page 5 of 7 FirstFirst 1234567 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 01-22-2015, 05:27 PM
  2. Double Value Shoes in query
    By nhkhurum in forum Queries
    Replies: 14
    Last Post: 11-16-2013, 03:55 AM
  3. Replies: 6
    Last Post: 04-26-2013, 10:07 AM
  4. Replies: 2
    Last Post: 02-13-2013, 04:14 PM
  5. how to solve this double query
    By gunterhoflack in forum Access
    Replies: 11
    Last Post: 01-28-2013, 07:58 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