How to edit field name

J

Jon

Greeting,
I have the following code and I have a form that has three commands
buttons(SA, SB,SC). What I want to do is once I click on SA the below
variable (CMD) change with SA value and so on with the rest of commends. How
can I do that please??


Function P(CMD)

Dim db As database
Dim ProductRec As Recordset
Set db=current db
Set ProductRec=db.OpenRecordset(“CheekCmdâ€)
ProductRec.Index = “PrimaryKeyâ€
ProductRec.Seek “=â€,1
With ProductRec

If not ProductRec.NoMatch Then
..Edit
!CMD =0
..Update
..Close
End if
End With

End Function
 

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