get results from combo box

hullstorage

Registered User.
Local time
Today, 10:20
Joined
Jul 18, 2007
Messages
213
hi there
is there a way of getting the dmax invoice number for a customer selected

so if i select a customer on a form these results would give me the highest invoice number for that given customer where the invoiced field is "no"


here are the fields from the table

customer
date
invoice number
amount
invoiced yes/no
 
hi there
is there a way of getting the dmax invoice number for a customer selected

so if i select a customer on a form these results would give me the highest invoice number for that given customer where the invoiced field is "no"


here are the fields from the table

customer
date
invoice number
amount
invoiced yes/no

dmax("Invoice number","Table name","Invoiced = No and customer = requiredcustomer")
 
do i put this in the query or form

tried both but does'nt seem to work

syntax error (missing operator) in query expression
 
I have had this problem I found that you need to put the requiredcustomer in single quotes

dmax("Invoice number","Table name","Invoiced = No and customer = '" requiredcustomer "'")

The dmax I have works in a form I declare CustHiInv as public.

CustHiInv =
dmax("Invoice number","Table name","Invoiced = No and customer = '" requiredcustomer "'")
 

Users who are viewing this thread

Back
Top Bottom