Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unanswered: Dataproject continuous form button issue

    I'm having difficulty with a nested form in an application that was converted from a standalone Access db to a dataproject. The application has a form containing a nested subform and the subform is a continuous type showing a list of related records. The continuous subform has a button on each row which opens another form to display related records. All of this works fine in Access but in the dataproject clicking the button allways opens the related form and displays records related to the first line on the continuous subform. The code attached to the button is very simple (included at the end of post). It seems like the problem is related to different form behavior in the dataproject. In Access cicking the button makes the row the current record (you can watch the record selector move to the row with the button you clicked). In the dataproject version, even if you have already selected the row you want to work with, clicking the button to open the form causes the selected record to allways revert to the first listed row on the continuous subform (hence the related form allways opens displaying those records). Any ideas?


    Button code:

    Private Sub Command16_Click()
    On Error GoTo Err_Command16_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "routing_main"

    stLinkCriteria = "[id]=" & Me![Text14]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Exit Sub

    MsgBox Err.Description
    Resume Exit_Command16_Click

    End Sub

  2. #2
    Join Date
    Feb 2004
    Yes, looks like the project is not seeing the open arguments. In that case, try using the filter method instead and remember to turn the "FilterOn" property to be true. Or try the Where option of Open form.


  3. #3
    Join Date
    May 2004
    Thanks for the reply. But I think it's more a form behavior issue in the dataproject since even if I set the button on the continuous form to simply open a message box displaying the current record index value it allways defaults to the first displayed record. For example, if the continuous form is showing 4 rows with index vals of 1,2,3 and 4 and I click the botton on the button on row three (index value of three) you can see the active record indicator revert to the top of the rows on the continuous form and the message box will display "1" (the index value for the first row listed on the conintuous form. This same form works fine in a regular Access DB. I was just hoping that someone had seen this issue before and would have a fix or work-around. (I am still trying to figure out what to do).

Posting Permissions

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