Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2011
    Posts
    30

    Unanswered: Record Navigation

    This is probably a simple one (for someone else).

    On my form, the record navigator at the bottom left of the page always says 1 of 1 although there are quite a few more records than that. the |< >| buttons do not cycle records. I'd prefer it to say record 1 of 80 as it should and be able to cycle through those records.

    What am I missing???

    Thanks for the help.
    Attached Thumbnails Attached Thumbnails 1 of 1.JPG  

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I suspect you have the Data Entry Property set to Yes. Simply set it to No. Access made a mistake in picking this name. Common sense would dictate that it has to be set to Yes in order for data to be entered, but that's not true! What it means is that you can only enter New Records, you cannot access existing Records!

    As long as AllowAdditions and AllowEdits are set to Yes, you'll be able to add and/or edit Records, assuming that the RecordSource is not Read-Only.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jul 2011
    Posts
    30
    That did the trick!!! Thanks! Now of course when the database opens it opens to record #1. I think I set that so that it would open to a blank record. Can I have both? Navigation option (Data Entry Property set to no) and open to new?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Sure! Just use this code
    Code:
    Private Sub Form_Load()
      DoCmd.GoToRecord , , acNewRec
    End Sub
    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jul 2011
    Posts
    30
    Two for two. Brilliant.

    When the form opens there are only a few fields visible. I have fields in my form that are contingent on other fields (field X = "YES" so make field Y visible and enabled, if field X = "NO", make field Z visible, and Y field not visible). It would be... nice... when a user navigates through previous and next records to show all fields. Is that possible?

    Last one... I promise.

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    In general terms, if you're doing formatting of a given Control dependent on another Control, you have to use code in the AfterUpdate event of the deciding Control and in the Form_Current event, so that the formatting persists appropriately as you move between Records. I'm only going to deal with ControlX and ControlY in this example, but you should be able to get the idea:
    Code:
    Private Sub ControlX_AfterUpdate()
     If Me.ControlX = "Yes" Then
       ControlY.Visible = True
     ElseIf Me.ControlX = "No" Then
        ControlY.Visible = False
     End If
    End Sub
    Code:
    Private Sub Form_Current()
     If Me.ControlX = "Yes" Then
       ControlY.Visible = True
     ElseIf Me.ControlX = "No" Then
        ControlY.Visible = False
     End If
    End Sub
    Setting the Visible Property should be enough, for what you're doing here.

    Also note that this code assumes that the "Yes" and "No" here means that the Control has a String of "Yes" or "No" entered into it. If you were talking about a Yes/No Field, i.e. a Boolean Field, you'd omit the Quotes in the code.

    Linq ;0)>
    Last edited by Missinglinq; 05-24-12 at 20:05.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •