I have a query (Qry_Brand_Serial_Numbers) that generates a list of product information which i can send to a mail merge document. e.g.
CODE
Brand Part Description Free Serial INOUT
PANASONIC PAN-CADC300N PANASONIC IPOD CABLE 9
PANASONIC PAN-CALRM10X REMOTE CONTROL SENSOR 45
PANASONIC PAN-CNDV2300N PANASONIC SAT NAV 5 *1002492* IN
PANASONIC PAN-CNDV2300N PANASONIC SAT NAV 5 *1002508* IN
Some parts have serial numbers and some dont. If the part does have a serial number then each item is sent to the mail merge. If it doesnt then only one label is "rendered". so if i have 45 units of a particular part number which has no serial number i have to manually adjust mail merge document by copy and paste.
I would like to create the facility to do the following
CODE
WHILE (!EOF[Qry_Brand_Serial_Numbers]){
IF (!Serial){ //All Non Serial Labels
FOR (j=0;j<Free;j++){
INSERT_INTO_NEW_TABLE()
}
ELSE{
INSERT_INTO_NEW_TABLE() //Serial Labels
}
I hope I've made sense. How do I write the VBA code to enable this? Am I going about this the right way? Can I do this from Word2003 itself?
I hope that you can help.
Kind regards
Resh