Hi,
A week or two back, with some invaluable help from this forum, I installed a button on a form which enabled me to produce a set of prints being one of each of a number of records selected by the backing query to that form. This saved me a great deal of time. Since then I've added a Select Case Statement which is intended to recognize different types of device within a record set and to select the correct report format in each case.
I've spent a great deal of time on this but can not get it to run correctly.
Some strange things happen. The code as attached will always print a ***D report regardless of whether the record field Me!ExType1 = d or n. However I had noted that the VBA editor always changed the n to uppercase. Thinking this might be because the ExType1 field was text I added quotes to the d & n. This stopped the case change but resulted in the printing of all records on the ***EN report. So I tried adding the quotes to the d only. The output reverted to everything printed on ***D reports!
Can someone tell me what is wrong with what I have been doing.
I also need some guidance on the selection of the "expression" in Select Case Expression. Everything I have read says it can be any string or numeric. However at least some examples I have looked at seem to suggest that it needs to refer to a specific object in the database.
A week or two back, with some invaluable help from this forum, I installed a button on a form which enabled me to produce a set of prints being one of each of a number of records selected by the backing query to that form. This saved me a great deal of time. Since then I've added a Select Case Statement which is intended to recognize different types of device within a record set and to select the correct report format in each case.
I've spent a great deal of time on this but can not get it to run correctly.
Some strange things happen. The code as attached will always print a ***D report regardless of whether the record field Me!ExType1 = d or n. However I had noted that the VBA editor always changed the n to uppercase. Thinking this might be because the ExType1 field was text I added quotes to the d & n. This stopped the case change but resulted in the printing of all records on the ***EN report. So I tried adding the quotes to the d only. The output reverted to everything printed on ***D reports!
Can someone tell me what is wrong with what I have been doing.
I also need some guidance on the selection of the "expression" in Select Case Expression. Everything I have read says it can be any string or numeric. However at least some examples I have looked at seem to suggest that it needs to refer to a specific object in the database.