• Drop-down list on Data Access Page (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Drop-down list on Data Access Page (Access 2000)

    Author
    Topic
    #364099

    Anybody out there familiar with data access pages? I’m trying to do something that is SO easy on a form, but can’t figure out how to do it in a data access page.

    I have an Access form (created using the wizard) bound to a table. There’s only 2 fields in the table, so the form has 2 text boxes, and a navigation bar at the bottom. I added a combo box so I could look up records, rather than having to use the record navigation arrows. This is an unbound combo, with a recordsource = to the table the form is bound to. I attached the following code to the combo:

    Private Sub cboFind_AfterUpdate()
    
        Dim rs As Object
        
        Set rs = Me.Recordset.Clone
        rs.FindFirst "[OTActivityCode] = '" & Me![cboFind] & "'"
        Me.Bookmark = rs.Bookmark
    
    End Sub
    

    This works like a charm…the correct record is selected and displayed on the form.

    Now, I’m trying to do the same thing on a data access page, for the same table. The wizard creates the drop-down list, and sets the listrowsource property. Everything works fine, except I can’t figure out how to force the chosen record (from the drop-down list) to appear on the form. I don’t want to filter the form, just jump to the correct record. I don’t really know how to do html, but was able to create a place in the script to do the code…just didn’t know what to code.

    Can anybody help? Thanks,

    Reply To: Drop-down list on Data Access Page (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: