Page 5 of 6 FirstFirst 123456 LastLast
Results 61 to 75 of 78
  1. #61
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You use macros so they do not show up in the Class (code) module for the Form so there is not really anything to post. If you converted the macros in this form to code and didn't save it there would be something to post that we could look at. If you do that, then post *all* of the code module from the very top @ "Option Compare Database" to the bottom so we can see all of the code there. If will not save the Form unless you say yes to the question.
    http://www.btabdevelopment.com/ts/de...aspx?PageId=91

  2. #62
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Code:
    Option Compare Database
    Option Explicit
    
    Private Sub cmdProjShortTitle_AfterUpdate()
    End Sub
    '[in green box] cmdProjShortTitle_AfterUpdate
    Private Sub cmdProjShortTitle_AfterUpdate()
       On Error GoTo cmdProjShortTitle_AfterUpdate_Err
       DoCmd.Requery "qryeditsubform"
    
    cmdProjShortTitle_AfterUpdate_Exit:
       Exit Sub
    cmdProjShortTitle_AfterUpdate_Err:
       MsgBox Error$
       Resume cmdProjShortTitle_AfterUpdate_Exit
    End Sub
    
    '[in green box] AddARecord_Click
    Private Sub AddARecord_Click()
       On Error GoTo AddARecord_Click_Err
       On Error Resume Next
       DoCmd.GoToRecord , "", acNewRec
       If (MacroError <> 0) Then
          Beep
          MsgBox MacroError.Description, vbOKOnly, ""
       End If
    
    AddARecord_Click_Exit:
       Exit Sub
    AddARecord_Click_Err:
       MsgBox Error$
       Resume AddARecord_Click_Exit
    End Sub
    
    '[in green box] cmdClose_Click
    Private Sub cmdClose_Click()
       On Error GoTo cmdClose_Click_Err
       DoCmd.Close , ""
    
    cmdClose_Click_Exit:
       Exit Sub
    cmdClose_Click_Err:
       MsgBox Error$
       Resume cmdClose_Click_Exit
    End Sub
    Last edited by RuralGuy; 07-03-2013 at 11:09 AM. Reason: Added code tags and indenting

  3. #63
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thank you! How about if we "eliminate the SubForm requery" temporarily? The changes will still be saved.

  4. #64
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Back from vacation.

    Problem with removing the requery is that without it, my subform wont show up. Unless you can think of a better way for the subform to show once the Project is selected....

  5. #65
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by Moridan View Post
    Back from vacation.

    Problem with removing the requery is that without it, my subform wont show up. Unless you can think of a better way for the subform to show once the Project is selected....
    What does "subform wont show up" mean?

  6. #66
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    The function that I need is when the Project is selected on the Edit Form (from list box based upon table of Projects), the subform will appear with all of the entries made for that specific Project within the last 30 days.

    The requery makes so that when I select the Project, it immediately displays the subform with all of the relevant entries. Would it make more sense to have some button that requerys instead of doing on an event attached to the list box selection?

  7. #67
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the SubForm *invisible* before that? A requery does not make a form visible. I'm a bit confused.

  8. #68
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    Is the SubForm *invisible* before that? A requery does not make a form visible. I'm a bit confused.
    Correct. The subform is not displayed until the form is requeried. I would assume the reason is that the subform's record source is the query that simply is for the last 30 days of all entries, and that by selecting the Project from the list box, it forces the subform to only display those entries relevant to both the overall query and the Project from the list box. Does that make sense? Probably not...

  9. #69
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you have AllowAdditions set False in the SubForm then a SubForm could show blank if it has no records in its RecordSource. Is that the case here?

  10. #70
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    The RecordSource for the subform is the query that shows all Updates made within the last 30 days. If I select a Project on the list box that doesnt have any Updates made against it, then the subform will not even show up. BUT... the damn thing will still save a blank entry in my table for the Project that I selected, even when I use the "Close Form" button.

  11. #71
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    We may not be able to resolve this without actually looking at your db. Did we already cover you post a copy of it? Compact and Repair and then zip it before posting?

  12. #72
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Ahh...I see you already addressed this in post #9. I'm not sure where to go from here.

  13. #73
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Do you have any recommendations on how else I could accomplish this Edit function that my boss wants? I am more than happy to do it another way.

    Thanks!

  14. #74
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you know you can *import* everything BUT the data into a fresh new db? It is on the first import tab under the Options... button.

  15. #75
    Moridan is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    60
    Quote Originally Posted by RuralGuy View Post
    Did you know you can *import* everything BUT the data into a fresh new db? It is on the first import tab under the Options... button.
    I'm not sure what doing this will gain me...everything else in the db works fine, it's just this one function that is giving me grief. If there is a better way of doing it I will gladly listen, but I dont want to start over...

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

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2012, 02:54 PM
  2. Data not appearing on the table in Access 2007
    By Nashskye13 in forum Access
    Replies: 2
    Last Post: 10-26-2012, 02:41 PM
  3. I'm stumped with learning VBA in Access
    By phineas629 in forum Programming
    Replies: 2
    Last Post: 01-06-2012, 04:57 PM
  4. SQL Server Requiring Multiple Logins
    By dbigel in forum SQL Server
    Replies: 0
    Last Post: 11-10-2011, 09:59 AM
  5. Too much data for Access 2007????
    By pdmc1 in forum Queries
    Replies: 3
    Last Post: 06-23-2011, 01:16 PM

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