Hello people 
I've got a piece of VBA scripting which runs as an event linked to a button on my MS Access form.
I maintain a database of members of staff at my organisation. It's pretty outdated...
I'm basically wanting to pull in their updated data (extracted from on our payroll system) from a spreadsheet, into a form, when clicking a button on a particular person's record.
This is what I have so far.
The function "CStr(DDERequest())" converts the cell number into the readable data, however I seem to have whitespace below the value.
What would I need to do to strip out this whitespace? Would I use strtrim? If so, I am unsure of the syntax... how would I incorporate strtrim into the above?
Many thanks in advance for any help offered.

I've got a piece of VBA scripting which runs as an event linked to a button on my MS Access form.
I maintain a database of members of staff at my organisation. It's pretty outdated...
I'm basically wanting to pull in their updated data (extracted from on our payroll system) from a spreadsheet, into a form, when clicking a button on a particular person's record.
This is what I have so far.
Code:
start = Forms!frm_main2!txt_start_row.Value - 1
conv = DDEInitiate("EXCEL", "Staff List.xlsx")
cell_employee_number = "R" & start & "C1"
cell_surname = "R" & start & "C2"
cell_forename = "R" & start & "C3"
cell_job_role = "R" & start & "C5"
cell_manager = "R" & start & "C6"
cell_department = "R" & start & "C7"
cell_email = "R" & start & "C8"
new_employee_number = CStr(DDERequest(conv, cell_esr_number))
new_surname = CStr(DDERequest(conv, cell_surname))
new_forename = CStr(DDERequest(conv, cell_forename))
new_job_role = CStr(DDERequest(conv, cell_job_role))
new_manager = CStr(DDERequest(conv, cell_manager))
new_department = CStr(DDERequest(conv, cell_department))
new_email = CStr(DDERequest(conv, cell_email))
The function "CStr(DDERequest())" converts the cell number into the readable data, however I seem to have whitespace below the value.
What would I need to do to strip out this whitespace? Would I use strtrim? If so, I am unsure of the syntax... how would I incorporate strtrim into the above?
Many thanks in advance for any help offered.
