Results 1 to 2 of 2

Thread: ADO

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    I have built a prog using VB6 and Access97. Its an MDI and there are 8 screens that are toggled using command buttons. Lets say I am on record 40 in the first screen and I have finished updating the info for this employee on this screen. When I click on any button to move to the next screen the recordset moves back tothe first record. How do I fix this so that when I move from screen to screen the recordset keeps its position for that record until I manually move the recordset? Please help I am a newbie to programming and I am not real familiar with the coding so any code you can provide wiould be helpful.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    I don't know how you are calling each screen in the sequence but the best way would be to add a procedure such as the one below and pass a parameter as in the brackets, the parameter would be the primary key of the record you wish to display

    Public Sub Edit(primKey as Long)
    'use the primkey value in here to pull up the record and
    'populate the form as you wish then show the form
    End Sub

    call this procedure on the command button click of the previous form and pass the appropriate records primary key

    frmNext.Edit thePrimaryKey

    Hope this helps

Posting Permissions

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

Click Here to Expand Forum to Full Width