Hi - I am looking to concatenate two variables, both are numbers, with a hyphen in the middle. Right now I have variables x1 and z1 and I want to create a new variable, b1. I have tried all different approaches and each time Access is taking the difference of the two variables, whereas I just want the text output of the two variables. This is what I have now:
In the end I want it to look like b1=z1-x1
Is there an easy way to get this to work? I have already tried to convert z1 and x1 to strings instead of integers but that does not work. I also have tried to insert text such as "to" in place of the hyphen but then I get an error that it is missing an operator.
Thanks!
Code:
Dim b1 As String
b1 = [z1] & " - " & [x1]
In the end I want it to look like b1=z1-x1
Is there an easy way to get this to work? I have already tried to convert z1 and x1 to strings instead of integers but that does not work. I also have tried to insert text such as "to" in place of the hyphen but then I get an error that it is missing an operator.
Thanks!