[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 433
  • Last Modified:

FindFirst Run-Time Error 3070:

I get a run time error that says:Microsoft Access Database engine does not recognize 'txtRequest' as a valid field name or expression.  Any Ideas why?
Private Sub txtDefinitions_Click()
DoCmd.OpenForm "frmRequestDefinitions", acNormal
 
    Dim GoHere As String
    
 
    GoHere = "[txtRequest]='" & Forms!frmAddDifferent!cboRequest & "'"
    Forms!frmRequestDefinitions.Recordset.FindFirst GoHere
     
End Sub

Open in new window

0
T1080
Asked:
T1080
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
txtRequest I assume is a control and not it fact a field name, which is what would be required as the first part of a WHERE clause in a FIndFirst expression.


rst.FindFirst "[SomeFieldName] = " & <Some criteria expression >

mx
0
 
T1080Author Commented:
Thanks for the help.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now