Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data From Previous Record

Status
Not open for further replies.

Grieve1

Programmer
Jun 11, 2008
33
GB
Hi I am trying to display the result of a field from a previous Record depending on 2 fields criteria e.g. Field name is "Payment" depends on fields "CompanyName" and "paymentNumber", Was trying to do a dlookup("[Payment]","qryPaymentCert","[PaymentNumber]="&[PaymentNumber]-1 and "[CompanyName] =""" & [CompanyName] & """") individually they work but not together any assistance would be gratefully Appreciated
 
Perhaps this ?
Code:
DLookUp("Payment", "qryPaymentCert", "PaymentNumber=" & [PaymentNumber]-1 & " AND CompanyName='" & [CompanyName] & "'")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you so much with just a little tweaking all is working great
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top