GoToRecord Problem!! (1 Viewer)

Mickster

Registered User.
Local time
Today, 12:13
Joined
Feb 10, 2005
Messages
38
Hi there I currently have a DB with a ton of records. What I want to do is have a search box pop up when the user presses a button on the main form. When this search box comes up there is a list box with all the records. The user will then double click a record on the List box and it should appear on the main form. However this is not happenening. Here is my code for the double click in the list box.

Private Sub List3_DblClick(Cancel As Integer)
On Error GoTo Err_List3_DblClick
' Open the info form based on the selection in this listbox.

Dim strFormName As String
strFormName = "complaints"

DoCmd.OpenForm strFormName
DoCmd.GoToRecord , strFormName, acGoTo, " caseid = " & Me![List3] (I think this is where the error is)

DoCmd.Close acForm, "frmLookup"

Exit_List3_DblClick:
Exit Sub

Err_List3_DblClick:


Someone please help!!!
thanks
MsgBox Err.description
Resume Exit_List3_DblClick
End Sub
 

MStef

Registered User.
Local time
Today, 20:13
Joined
Oct 28, 2004
Messages
2,251
Hello Mickster!

Instead of your code, look at "DemoFindA2002.mdb".
I think it can help you. Open frmForm1.
 

Attachments

  • DemoFindA2002.zip
    23.7 KB · Views: 198

Users who are viewing this thread

Top Bottom