Results 1 to 1 of 1
2001-12-12, 23:20 #1
- Join Date
- Jan 2001
- L.A., California
- Thanked 0 Times in 0 Posts
Drop-down list on Data Access Page (Access 2000)
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:
<pre>Private Sub cboFind_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OTActivityCode] = '" & Me![cboFind] & "'"
Me.Bookmark = rs.Bookmark
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,