ms access form fields into a string vba -


i have form (say) data, contains text boxes a,b,c.

i wish write email based on form data. in email body, want following format:

a : (actual value of in text box in form) (a newline) b : ((actual value of b in text box in form) ( newline) c : ((actual value of c in text box in form).

i know can access values forms!data!a_value (assuming named box a_value). not able combine them string , add newline too.

i have tried following:

dim body string  body = "a : & forms!data!a_value &" & "b : & forms!data!b_value &" & "c : & forms!data!c_value &" 

it because read & results new line somewhere.

however, when that, whole thing concatenated written in code , no values obtained form field. please suggest options: in advance

you want like:

dim body string  body = "a : " & forms!data!a_value & vbnewline & _        "b : " & forms!data!b_value & vbnewline & _        "c : " & forms!data!c_value  

note: fact wrote code on 3 lines, using line continuation characters, nothing insertion of new line characters in output. have been written

body = "a : " & forms!data!a_value & vbnewline & "b : " & forms!data!b_value & vbnewline & "c : " & forms!data!c_value  

but find harder read.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -