I want to open a form to find addresses based on grid references within a range. I have 3 unbound text boxes, all with a general number format txtEastSrch, txtNorthSrch and txtENRange.
My code is
stLinkCriteria = "[Easting]>" & (Me![txtEastSrch] - Me![txtENRange]) & "and [Easting]<" & Format(Me![txtEastSrch], "general number") + Format(Me![txtENRange], "general number") & "and [Northing]>" & (Me![txtNorthSrch] - Me![txtENRange]) & "and [Northing]<" & Format(Me![txtNorthSrch], "general number") + Format(Me![txtENRange], "general number")
When I run this, the minuses work fine but the pluses concatenate. If I replace Me![txtENRange] with a number, it works fine.
I'm obviously overlooking something
Rosie
"Never express yourself more clearly than you think" (Niels Bohr)
My code is
stLinkCriteria = "[Easting]>" & (Me![txtEastSrch] - Me![txtENRange]) & "and [Easting]<" & Format(Me![txtEastSrch], "general number") + Format(Me![txtENRange], "general number") & "and [Northing]>" & (Me![txtNorthSrch] - Me![txtENRange]) & "and [Northing]<" & Format(Me![txtNorthSrch], "general number") + Format(Me![txtENRange], "general number")
When I run this, the minuses work fine but the pluses concatenate. If I replace Me![txtENRange] with a number, it works fine.
I'm obviously overlooking something
Rosie
"Never express yourself more clearly than you think" (Niels Bohr)