vba - Assigning new values to an unbound box in my report -
i have designed report query.
it important me written out names of babies appear in specific unbounded box in report, i.e. names start "eta*" please write out "etanerella", example.
when run code don't got warning, nothing being written in unbounded box.
option compare database option explicit sub testing() ' defining rename baby names dim newbio string dim sqlana string dim sqlada string dim sqlcan string dim sqleta string sqlana = "alice" sqlaba = "about" sqlcan = "canibal" sqleta = "etanerella" 'newbio = left(me![tbl_patientjadas_b1.therapie1], 3) if left(reports![tbl_patientjadas_b1.therapie1], 3) "*eta*" 'me!bionew.optionvalue = sqleta elseif reports![tbl_patientjadas_b1.therapie1] "*ada*" 'me!bionew.optionvalue = sqlada elseif reports![tbl_patientjadas_b1.therapie1] "*ana*" 'me!bionew.optionvalue = sqlada else reports!bionew.optionvalue = "baba" end if 'the code end sub
you need use value property textbox:
if left(reports![tbl_patientjadas_b1.therapie1], 3) = "eta" me!bionew.value = sqleta
wiki
Comments
Post a Comment