Prompting

  • Thread starter Thread starter Love Buzz
  • Start date Start date
L

Love Buzz

Hi all.

Here is a snipet of my query

UserID = [Returns Associates].[User ID]

It works like a charm, but what if I want the results to reflect all of the
User IDs?

Hope that made sense. Thanks for your help.
 
Try changing the SQL to:

UserID Like [Returns Associates].[User ID] & "*"

When you want to see all, just leave the User ID field blank.

It's possible that you might get some extra records when looking for a
specific User ID. For example 123 will also return 1234, 12345, etc.
 
Thanks Jerry. Unfortunatly that returned a blank result.

Jerry Whittle said:
Try changing the SQL to:

UserID Like [Returns Associates].[User ID] & "*"

When you want to see all, just leave the User ID field blank.

It's possible that you might get some extra records when looking for a
specific User ID. For example 123 will also return 1234, 12345, etc.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Love Buzz said:
Hi all.

Here is a snipet of my query

UserID = [Returns Associates].[User ID]

It works like a charm, but what if I want the results to reflect all of the
User IDs?

Hope that made sense. Thanks for your help.
 
Another option if you want to have exact matches is to use-

UserID Like Nz([Returns Associates].[User ID],"*")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Thank you for your response.

When I plug that in, I get a 'Join' error.

John Spencer said:
Another option if you want to have exact matches is to use-

UserID Like Nz([Returns Associates].[User ID],"*")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Jerry said:
Try changing the SQL to:

UserID Like [Returns Associates].[User ID] & "*"

When you want to see all, just leave the User ID field blank.

It's possible that you might get some extra records when looking for a
specific User ID. For example 123 will also return 1234, 12345, etc.
 
Probably because I made a wrong assumption that you were trying to do this
in a WHERE clause and that UserId was a text field.

IF you want a solution you might consider posting the ENTIRE SQL statement
instead of a snippet. You might also identify the field types of those
fields that are involved in your problem.


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Love Buzz said:
Thank you for your response.

When I plug that in, I get a 'Join' error.

John Spencer said:
Another option if you want to have exact matches is to use-

UserID Like Nz([Returns Associates].[User ID],"*")

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Jerry said:
Try changing the SQL to:

UserID Like [Returns Associates].[User ID] & "*"

When you want to see all, just leave the User ID field blank.

It's possible that you might get some extra records when looking for a
specific User ID. For example 123 will also return 1234, 12345, etc.
 
Back
Top