P
Phil Pereira
I am trying to create a custom auto number field where I need to look up
the highest value of an item that belongs to a certain field, then add
1. If I use the literal
Text1.value=DMax("[ItemNumber]","Query1","[Client] = 'ClientName'") + 1
I get the desired results. But if I try to use a variable in place of
the [Client] = 'ClientName' part, all I get returned is #name? or some
unfathomable run time error, depending on how I try to concatenate the
combination of quotes, brackets, etc. Does anyone know how I can
reliably use variables in place of the literals with this? I can't find
any examples in the online help or searching the web.
thanks,
Phil
the highest value of an item that belongs to a certain field, then add
1. If I use the literal
Text1.value=DMax("[ItemNumber]","Query1","[Client] = 'ClientName'") + 1
I get the desired results. But if I try to use a variable in place of
the [Client] = 'ClientName' part, all I get returned is #name? or some
unfathomable run time error, depending on how I try to concatenate the
combination of quotes, brackets, etc. Does anyone know how I can
reliably use variables in place of the literals with this? I can't find
any examples in the online help or searching the web.
thanks,
Phil