private sub command1_click
dim resp as string
iniet:
resp = inputbox("Digíte o código do cliente.","Etiquetas")
if resp = "" then
exit sub
else
if isnumeric(resp) = false then
msgbox "Código Inválido",vbinformation,"Etiquetas"
goto iniet
end if
rs.open "select nome,endereco from clientes where codigo = " & cdbl(resp)
if rs.eof = false then
printer.print tab(05); rs!nome
printer.print tab(05); rs!endereco
printer.enddoc
else
msgbox "Cliente inexistente.",vbcritical,"Clientes"
end if
rs.close
end sub