Nightowl4933
Tryin' to do it right...
- Local time
- Today, 21:14
- Joined
- Apr 27, 2016
- Messages
- 151
Hello. Me again 
I have a form which is used as a 'launchpad' for users to search for records meeting specific criteria and it's working - with one exception!
I would like to use a variable in the search string so that, for example, a Post Code search can be carried out on parts of it, rather than the whole lot.
To put together the string, I'm using the following...
strReference = "Application Reference Like '*" & strReference & "*'"
...and another bit like this...
strPostCode = "Post Code = '*" & strPostCode & "*'"
...but I get a VBA error for the top one:
Run-time error '3075':
Syntax error (missing operator) in query expression 'Applicatio Reference Like '*15/*'"
...and a similar error for the other one.
What I'm trying to do is pass these variables from one form to limit the number of records on the next.
Also, is it possible to use multiple variables to do this?
Could someone point me in the right direction, please?
Thanks
I have a form which is used as a 'launchpad' for users to search for records meeting specific criteria and it's working - with one exception!
I would like to use a variable in the search string so that, for example, a Post Code search can be carried out on parts of it, rather than the whole lot.
To put together the string, I'm using the following...
strReference = "Application Reference Like '*" & strReference & "*'"
...and another bit like this...
strPostCode = "Post Code = '*" & strPostCode & "*'"
...but I get a VBA error for the top one:
Run-time error '3075':
Syntax error (missing operator) in query expression 'Applicatio Reference Like '*15/*'"
...and a similar error for the other one.
What I'm trying to do is pass these variables from one form to limit the number of records on the next.
Also, is it possible to use multiple variables to do this?
Could someone point me in the right direction, please?
Thanks