show all records?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AccessIdiot
    Contributor
    • Feb 2007
    • 493

    show all records?

    This is odd. I have a form that is related to a table that has 6 or 7 entries in it. When I launch the form it automatically goes to a new record. But it is showing 1 of 1 and I can't go to first or last or any other record. If I type in a bunch of new records I can navigate amongst the ones I've just entered but not the ones that existed before.

    Allow Additions is set to yes, Data Entry is set to No, Allow Edits is set to Yes, basically all the defaults.

    The only thing I have in the form on load function is a call to a function that checks the value of a combo box and determines if a related text box needs to be enabled or not. But I am still not showing all records even when I remove the event.

    Any ideas?
  • developing
    New Member
    • Mar 2007
    • 110

    #2
    you should try removing the event then compacting the db as a start

    Comment

    • AccessIdiot
      Contributor
      • Feb 2007
      • 493

      #3
      Okay, did that and still nothing.

      Any ideas? :-)

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Double check Data Entry and make sure that's No.
        Check the record source of the form and make sure that's linking to the right table.
        Create a few records and see if it's saving to the table.

        Comment

        • AccessIdiot
          Contributor
          • Feb 2007
          • 493

          #5
          Originally posted by Rabbit
          Double check Data Entry and make sure that's No.
          Check the record source of the form and make sure that's linking to the right table.
          Create a few records and see if it's saving to the table.
          Yes yes and yes. Everything gets saved and I can cruise between records during a session (if you will) but it doesn't show ALL the records in the table, only the ones I've entered when the form is open.

          That's weird right? It's not just me? :-D

          Comment

          • MMcCarthy
            Recognized Expert MVP
            • Aug 2006
            • 14387

            #6
            Originally posted by AccessIdiot
            Yes yes and yes. Everything gets saved and I can cruise between records during a session (if you will) but it doesn't show ALL the records in the table, only the ones I've entered when the form is open.

            That's weird right? It's not just me? :-D
            No, it is weird. What code are you using to open this form? Is there a filter on the form?

            Comment

            • AccessIdiot
              Contributor
              • Feb 2007
              • 493

              #7
              Standard Access button Open Form command with a little bit added:
              Code:
              Private Sub btnEntrainment_Click()                                                  'Entrainment button
              On Error GoTo Err_btnEntrainment_Click
              
                  Dim stDocName As String
                  Dim stLinkCriteria As String
              
                  stDocName = "frm_Entrainment"
                  DoCmd.OpenForm stDocName
                  DoCmd.GoToRecord , , acNewRec
                  
                  DoCmd.Close acForm, "frm_MainMenu"
              
              Exit_btnEntrainment_Click:
                  Exit Sub
              
              Err_btnEntrainment_Click:
                  MsgBox Err.Description
                  Resume Exit_btnEntrainment_Click
                  
              End Sub
              frm_MainMenu contains the button that this code is on. I'm simply closing it as the new form is launched. I also want the form to start on a new shiny record. I tried commenting out the DoCmd.GoToRecor d but it didn't make a difference.

              I'm glad I'm not the only one thinking it is weird. :-)

              Comment

              • MMcCarthy
                Recognized Expert MVP
                • Aug 2006
                • 14387

                #8
                Originally posted by AccessIdiot
                Standard Access button Open Form command with a little bit added:
                Code:
                Private Sub btnEntrainment_Click()                                                  'Entrainment button
                On Error GoTo Err_btnEntrainment_Click
                
                    Dim stDocName As String
                    Dim stLinkCriteria As String
                
                    stDocName = "frm_Entrainment"
                    DoCmd.OpenForm stDocName
                    DoCmd.GoToRecord , , acNewRec
                    
                    DoCmd.Close acForm, "frm_MainMenu"
                
                Exit_btnEntrainment_Click:
                    Exit Sub
                
                Err_btnEntrainment_Click:
                    MsgBox Err.Description
                    Resume Exit_btnEntrainment_Click
                    
                End Sub
                frm_MainMenu contains the button that this code is on. I'm simply closing it as the new form is launched. I also want the form to start on a new shiny record. I tried commenting out the DoCmd.GoToRecor d but it didn't make a difference.

                I'm glad I'm not the only one thinking it is weird. :-)
                DoCmd.GoToRecor d , , acNewRec shouldn't cause a problem but I would leave it commented out at the moment.

                The only other thing is a filter. Open the form as you would normally and then change the form view to design view. See if anything appears in the filter property.

                Comment

                • AccessIdiot
                  Contributor
                  • Feb 2007
                  • 493

                  #9
                  No filter, commented out goto command, same problem?

                  Comment

                  • MMcCarthy
                    Recognized Expert MVP
                    • Aug 2006
                    • 14387

                    #10
                    Originally posted by AccessIdiot
                    No filter, commented out goto command, same problem?
                    Melissa

                    It's possible the form is corrupted. Which means designing a new form.

                    Is there any other code on the form that could be affecting the records returned?

                    Mary

                    Comment

                    • AccessIdiot
                      Contributor
                      • Feb 2007
                      • 493

                      #11
                      That was my thought too. No, nothing else effecting the form that I know of.

                      This one is probably the simplest form I have in terms of not having a subform or other forms tied to it (well, there are but it's a simple button click) so I don't mind redoing it.

                      I don't supposed I can copy and paste the controls? Or would it be better just to redesign from scratch?

                      thanks for your help!

                      cheers

                      Comment

                      • MMcCarthy
                        Recognized Expert MVP
                        • Aug 2006
                        • 14387

                        #12
                        Originally posted by AccessIdiot
                        That was my thought too. No, nothing else effecting the form that I know of.

                        This one is probably the simplest form I have in terms of not having a subform or other forms tied to it (well, there are but it's a simple button click) so I don't mind redoing it.

                        I don't supposed I can copy and paste the controls? Or would it be better just to redesign from scratch?

                        thanks for your help!

                        cheers
                        I would design it from scratch and test it at different stages to see if you can still see all records. Then if the same problem arises you will have a better idea what is causing it.

                        Mary

                        Comment

                        Working...