ELabelBatch1.FormatName = tPath.Text ELabelBatch1.Field("PARTNO") = tPNum.Text ELabelBatch1.Field("COLOR") = tColor.Text ELabelBatch1.UpdatePreviewThis loads the template named in the tPath text box, sets two field values, and updates the preview. It works like it's supposed to. In VFP, I created a form with the same ELabelBatch control and put some code behind a command button, like this:
thisform.elb1.formatName="c:\eldemo\format1.fmt" thisform.elb1.Field("PARTNO") = "123456" thisform.elb1.Field("COLOR") = "Green" thisform.elb1.updatePreview()It DOES load the specified template, and it DOES show the preview, but the lines where it sets the field values return an error 'Function argument value, type, or count is invalid'. This is the SAME template used in the VB sample. The PARTNO and COLOR fields definitely exist. I've tried upper and lower case (in the designer program the field names actually show as lower case), single and double quote delimiters, etc. with no better results. I get the same error message when I purposely specify a field name the does not exist. Am I missing something obvious here, or is this just one of those ActiveX controls that won't work with VFP?