Results 1 to 10 of 10
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    unbound field


    Have an unbound search field drop down SSN#. The format is @@@-@@-@@@@ in the
    table. I have the impact mask for SSN. So when users type in the field to search
    it; they have to type the whole SSN# not the first few digits and it
    autopopulates. How can I get the field to popup after the first few numbers are
    entered? They also complain they need to be at the beginning of the field to
    start which if they don’t (start somewhere after the first) they get an error
    which they say slows them down. If I remove the input mask; they can do what they want but they don't use hypens so the record doesn't return. Help pls.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,934
    They want the cake and eat it too?

    Try:

    Calc a field in query removing the hyphens and use that field as the search field with the combobox. The combobox RowSource would also have the SSN numbers calced without the hyphens, this would be hidden column, the value with hyphens would be the display column.

    SELECT Replace([ssn],"-","") As SSNnoHyp, ssn FROM tablename ORDER BY ssn;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    getting datatype mismatch. My ssn field is a text field. Thanks

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,934
    Datatype mismatch where? Enclose in apostrophes value used as criteria for a text field. Post code or query sql.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Datatype mismatch. SSN field is text

    Code:
    SELECT DISTINCT qryEmpSSN.SSN, Replace([ssn],"-","") AS SSNoHyp
    FROM qryEmpSSN
    ORDER BY qryEmpSSN.SSN;

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,934
    Don't understand why that is happening.

    The query works for me.

    You said the combobox is unbound?

    Why pull the RowSource from query instead of table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Because there's criteria for the form and I don't need all the records(SSN) the table itself have a lot of records.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,934
    What criteria in the query restricts the records?

    Since I can't replicate issue with the RowSource sql, I can't offer a solution.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    I tried the code with just a table as the source of the form and it works. But when I put it on the unbound field i get the datatype mismatch. Something to do with the unbound field.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,934
    Combobox RowSource works for me. I am testing on an unbound form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Unbound Box to populate field in Table
    By quicova in forum Forms
    Replies: 13
    Last Post: 09-13-2013, 09:24 AM
  2. Unbound field control Problem
    By justphilip2003 in forum Programming
    Replies: 1
    Last Post: 03-20-2013, 09:10 AM
  3. FIltering forms using an unbound field
    By Scandiaman in forum Forms
    Replies: 2
    Last Post: 10-28-2012, 06:50 PM
  4. Immediate Update of Unbound Field
    By FormerJarHead in forum Forms
    Replies: 8
    Last Post: 10-08-2012, 04:39 PM
  5. populate unbound field
    By DCV0204 in forum Access
    Replies: 3
    Last Post: 03-16-2012, 02:41 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