Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    82

    Unanswered: Record controls don't work with selector

    Problem statement:

    I have a form with the record control video buttons. I also have an unbound record selector combo box to select specific records. When the latter is used, I get the specific record for edit purposes.

    However, I would like the user to be able to use the video buttons, if necessary, to move forward or backward from the chosen record. This does not work at present, as the form only shows an empty record forward and backward.

    How does one go about activating the video controls with the chosen record as the starting point?

    Thanks in advance for your suggestions.

  2. #2
    Join Date
    Mar 2004
    Posts
    33
    I had somewhat the same problem when having to replace the built in navigation buttons for users who have difficulty with the default size.

    To solve this:
    I used the command button wizard to create the First, Previous, Next, Last and New buttons.

    I created two unbound text boxes labeled:

    In the OnCurrent Event for the form, I used the following code:
    Me.RecordNumber = Me.CurrentRecord ''Obtains the current record number
    Me.TotalRecords = "of" & " " & Me.RecordsetClone.RecordCount 'Obtains total number of records displayed


    In the After Update Event for the RecordNumber text box I used the following code:

    Dim strRecordNumber As Integer
    strRecordNumber = Me.RecordNumber.Value
    DoCmd.GoToRecord acActiveDataObject, , acGoTo, strRecordNumber

    _______________________

    I did add some error checking in both of the procedures and had to add a SetFocus to move the focus to the first field in the form.

    Hope this helps.

    toliver
    Attached Thumbnails Attached Thumbnails recordselectors.bmp  

  3. #3
    Join Date
    Mar 2004
    Posts
    82

    Thanks; some problems...

    Hi,
    First off, thanks for the suggestion.
    I implemented your code and it worked - partly. Some unusual problems:

    1. The total records box doesn't appear to total the number of records; so I have the two boxes saying "1 of 1" when I pull up a particular record using my combo box selection. When no records have been pulled up, the two boxes say "1 of 0".

    2. When I do pull up a specific record, my navigation buttons (which I created using the wizard, they are not the built-in record selectors) behave in the following way:

    GoToFirst: When a record has been pulled up, this button does nothing.
    GoToPrevious: I get an MS box saying "You can't go to the specified record".
    GoToNext: I get an empty record.
    GoToLast: I get the originally selected record back again.

    Would appreciate your thoughts on how to go about correcting these.

  4. #4
    Join Date
    Mar 2004
    Posts
    33

    Re: Thanks; some problems...

    Originally posted by Jablonski
    Hi,
    First off, thanks for the suggestion.
    I implemented your code and it worked - partly. Some unusual problems:

    1. The total records box doesn't appear to total the number of records; so I have the two boxes saying "1 of 1" when I pull up a particular record using my combo box selection. When no records have been pulled up, the two boxes say "1 of 0".

    2. When I do pull up a specific record, my navigation buttons (which I created using the wizard, they are not the built-in record selectors) behave in the following way:

    GoToFirst: When a record has been pulled up, this button does nothing.
    GoToPrevious: I get an MS box saying "You can't go to the specified record".
    GoToNext: I get an empty record.
    GoToLast: I get the originally selected record back again.

    Would appreciate your thoughts on how to go about correcting these.

    Are you applying a filter when you select an item from your combo box?

Posting Permissions

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