Page 3 of 3 FirstFirst 123
Results 31 to 40 of 40
  1. #31
    NadiaVKhan is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    25
    No. I have a table called tblInformation.

    The first field is called CaseNumber. The second is CustomerName. The third is Home Phone

    I can have the following data:



    CaseNumber CustomerName Home Phone
    1222 James Smith 555-999-6565
    1222 John Adams 555-888-9898
    1222 Amber White 555-665-5555
    1223 Joe Biden (555)505-5404

  2. #32
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,431
    CaseNumber CustomerName Home Phone
    1222 James Smith 555-999-6565
    1222 John Adams 555-888-9898
    1222 Amber White 555-665-5555
    1223 Joe Biden (555)505-5404
    That table schema does not match up with either query in post #23 or post #12.
    We need to see the SQL of the query. Also don't see much point in blanking out the field names.
    Last edited by davegri; 04-03-2017 at 02:07 PM. Reason: more

  3. #33
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,431
    This works.
    Here's the query Grid.

    Attachment 28105

    Here's the result
    Attachment 28106

    Here's the SQL
    SELECT tblInformation.CaseNumber, tblInformation.CustomerName
    FROM tblInformation
    WHERE (((getnumbers(CStr([Home Phone]))) Like "*5404*"));

  4. #34
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,479
    So it works?

  5. #35
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,431
    Works as posted by me. Should work for OP.

  6. #36
    NadiaVKhan is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    25
    Thank you for the help everyone. I tried the SQL exactly how Davegri did it. But I am unable to run the query as I get the error: (Invalid Use of Null).

    I also get this error when I try it straight from design view (which didnt happen before)

  7. #37
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Can you post your database on here Nadia even with made up data. It would certainly help us solve it


    Sent from my iPhone using Tapatalk

  8. #38
    NadiaVKhan is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    25
    I actually just make an example blank database to send to you. And it worked..

    I think I figured it Out. I removed all Nulls from my query

  9. #39
    NadiaVKhan is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    25
    Thank you everyone!

  10. #40
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    What about the null values in future? Maybe a slight alteration to the function.


    Sent from my iPhone using Tapatalk

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Replace() for special characters
    By RayMilhon in forum Programming
    Replies: 2
    Last Post: 01-07-2017, 02:44 PM
  2. Special Delimiter characters
    By cliff.clayman in forum Import/Export Data
    Replies: 12
    Last Post: 09-13-2016, 10:52 AM
  3. Replies: 1
    Last Post: 07-22-2015, 08:11 AM
  4. Special characters in Default Value and Query
    By blacksaibot in forum Queries
    Replies: 1
    Last Post: 03-07-2012, 10:36 AM
  5. Special Characters
    By orgelizer in forum Access
    Replies: 0
    Last Post: 03-20-2007, 08:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums