Problem with FindRecord in Access 2007

M

Matt P

I made a database in access 2002 and now I am trying to run it in
Access 2007. The only problem I had was with the FindRecord method.
Heres my code:

Private Sub lstCompanyNames_Click()
DoCmd.GoToControl "fldContactsID"
DoCmd.FindRecord Me.lstCompanyNames.Column(1)
End Sub

Private Sub lstAddresses_Click()
DoCmd.GoToControl "fldContactsID"
DoCmd.FindRecord lstAddresses.Column(1)
'DoCmd.GoToControl "txtAdjusterName"
End Sub

When the person clicks on the list box it goes to that record on the
same form... the problem is that when I try and use it in Access 2007
it gives me the error 2142 "The FindRecord action requires a find what
argument"

In access 2002/ 2003 it works fine... but in Access 2007 it says I
don't have the Find What argument, which is obviously there!

Anyways can anyone figure this one out? I would greatly appreciate it!

Thanks,
Matt
 
M

Matt P

I made a database in access 2002 and now I am trying to run it in
Access 2007.  The only problem I had was with the FindRecord method.
Heres my code:

Private Sub lstCompanyNames_Click()
    DoCmd.GoToControl "fldContactsID"
    DoCmd.FindRecord Me.lstCompanyNames.Column(1)
End Sub

Private Sub lstAddresses_Click()
    DoCmd.GoToControl "fldContactsID"
    DoCmd.FindRecord lstAddresses.Column(1)
    'DoCmd.GoToControl "txtAdjusterName"
End Sub

When the person clicks on the list box it goes to that record on the
same form... the problem is that when I try and use it in Access 2007
it gives me the error 2142 "The FindRecord action requires a find what
argument"

In access 2002/ 2003 it works fine... but in Access 2007 it says I
don't have the Find What argument, which is obviously there!

Anyways can anyone figure this one out? I would greatly appreciate it!

Thanks,
Matt

Could it possibly be a reference that I have to register and
unregister? I downloaded SP2 and upgraded access which didn't seem to
prove much. Anyways anyone want to take a punch at it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Filtering 2
Somebody Please Help Me 24
DoCmd.FindRecord Me! 6
FindRecord Error 2
Append a wildcard to a text search string 3
Requery or refresh - which to use 3
FindRecord problem 1
Help with FindRecord 1

Top