Field not updating...

raghuprabhu

Registered User.
Local time
Today, 05:10
Joined
Mar 24, 2008
Messages
154
I have attached a small database. In the "sFrmIncrements" there is a field named "newIncrement" I am trying to update the field but is not working. I don't know why.

IIf(LookUp("incrementOf","tblPFST","tblPFST.serviceOf='" & [serviceType] & "' And tblPFST.rankOf='" & [rank] & "'")>[increment],[increment]+1,"N/A") is the data source for the field.

If I try it in the intermediate window it is working.

? IIf(LookUp("incrementOf","tblPFST","tblPFST.serviceOf='1' And tblPFST.rankOf='CAPT'")>2,3+1,"N/A") is giving 3

? IIf(LookUp("incrementOf","tblPFST","tblPFST.serviceOf='1' And tblPFST.rankOf='CAPT'")>5,5+1,"N/A") is giving "N/A"


What could I be doing incorrectly?

Thanks...

Raghu Prabhu
 

Attachments

Sorted it by way of using select case method.

instead of one line of code

IIf(LookUp("incrementOf","tblPFST","tblPFST.serviceOf='1' And tblPFST.rankOf='CAPT'")>5,5+1,"N/A")

I ended up writing 500 lines of code.

Cheers
Raghu
 

Attachments

Users who are viewing this thread

Back
Top Bottom