Syntax Help

G

Guest

I am having problems with the findfirst statement. I am sure it is because I
don't have the proper " ' & syntax that is necessary for a text string but
this eludes me.

Any help with the proper formating to find this [INVNUM} in my table would
be appreciated.

Dim ntf As String 'nft = number to find
ntf = Forms![frmrecievables]![inv2find]

Set rst = db.OpenRecordset("Accounts Recievable")
' [INVNUM] is a unique string in the table
rst.FindFirst "[INVNUM]=" & ntf
rst.Edit
rst![OPEN BALANCE] = 10000 'just set this to 10K so I can check to see if
correct record was found
rst.Update
Set rst = Nothing
 
R

Rick Brandt

cvegas said:
I am having problems with the findfirst statement. I am sure it is because I
don't have the proper " ' & syntax that is necessary for a text string but
this eludes me.

What did you try?

rst.FindFirst "[INVNUM]='" & ntf & "'"
 

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

Top