This is something of a follow up on a project inspired by my assistance on another thread. Essentially the goal is to print a mailing label directly from customer maintenance by clicking on a button when in that customer. Everything works just fine with the exception of selecting the specific customer - I always get ALL customers - not the one requested. I believe the problem comes from the fact that a customer number is actually made up of the division number and the customer number The value for FullCustomerNo below is previously obtained in the script. In my testing I have confirmed that I am getting 00ORANGE (i.e. no dash in the full customer number). ' Set Selection criteria retVal = ARLABELPRINT.SetValue("SelectField$", "Customer Number") ; I had concluded that these are the names you would see in the mailing label dialogs, I'm not really clear why there are two values for what seem to be the same thing? retVal = ARLABELPRINT.SetValue("SelectFieldValue$", "Customer Number") retVal = ARLABELPRINT.SetValue("Tag$", "TABLE=AR_CUSTOMER; KEYREFERENCE= ARDivisionNo$+CustomerNo$ ;") retVal = ARLABELPRINT.SetValue("Operand$", "=") retVal = ARLABELPRINT.SetValue("Value1$", FullCustomerNo) retVal = ARLABELPRINT.Write() retVal = oSession.AsObject(oSession.UI).MessageBox("About to print") retVal = ARLABELPRINT.ProcessReport("PREVIEW") Can anyone clear up my confusion?
↧