Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pick list quey.

Status
Not open for further replies.

dommales

MIS
Aug 10, 2001
10
GB
Hi,

I have the following code on a form:

Option Compare Database
Option Explicit
------------------------------------
Private Sub List0_AfterUpdate()
ShowRecord.Enabled = True

End Sub
--------------------------------------
Private Sub List0_DblClick(Cancel As Integer)

If Not IsNull(List0) Then
ShowRecord_Click
End If
End Sub
--------------------------------------
Private Sub ShowRecord_Click()
Dim rst As Recordset

Set rst = Forms!Test.RecordsetClone

rst.FindFirst "ID = " & List0

Forms!Test.Bookmark = rst.Bookmark

DoCmd.Close acForm, "GoToRecordDialog"

End Sub
------------------------------------


The error comes up with:

Compile error, Method or member data not found.

I have borrowed it off another comany database and it works fine in that one.

Thanks

Dom



 
Oops Sorry,

The bit highlighted is

Private Sub ShowRecord_Click()

Thanks
 
Sounds like ShowRecord should be a control on your form. Do you have a button or listbox with the name ShowRecord? It is possible that the database you borrowed this from had a control with this name. You copied the code but not the controls and their names.

Just a thought...

B-) ljprodev@yahoo.com
ProDev, MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top