G
Guest
Hi
I have a query that picks up various pieces of data from tblEstimate. One of
these fields is EstimateNo
I have another table called tblInvoiceNumbers, there are only two fields in
tblInvoiceNumbers - EstimateNo and InvoiceNo, all fields described are number
fields. There is a relationship between the fields EstimateNo in both tables
described.
I wish to write an expression in qryInvoice that looks up values in
tblInvoiceNumbers based upon the EstimateNo and if there is no matching data
with EstimateNo then I want to Dmax +1 the highest number within the
InvoiceNo field in tblInvoiceNumbers, however if there is a invoice number
already recorded against the estimate number then I wish to use that invoice
number.
So a brief summary how I see it is
Iff statement regarding using any existing record in tblInvoiceNumbers which
incorporates the DLookup and Dmax statements.
If anyone can understand this and thinks that I may be doing the wrong thing
could you please advise a better way
I have a query that picks up various pieces of data from tblEstimate. One of
these fields is EstimateNo
I have another table called tblInvoiceNumbers, there are only two fields in
tblInvoiceNumbers - EstimateNo and InvoiceNo, all fields described are number
fields. There is a relationship between the fields EstimateNo in both tables
described.
I wish to write an expression in qryInvoice that looks up values in
tblInvoiceNumbers based upon the EstimateNo and if there is no matching data
with EstimateNo then I want to Dmax +1 the highest number within the
InvoiceNo field in tblInvoiceNumbers, however if there is a invoice number
already recorded against the estimate number then I wish to use that invoice
number.
So a brief summary how I see it is
Iff statement regarding using any existing record in tblInvoiceNumbers which
incorporates the DLookup and Dmax statements.
If anyone can understand this and thinks that I may be doing the wrong thing
could you please advise a better way