Results 1 to 3 of 3
  1. #1
    fainterm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    17

    changing field on table from Text to Number

    I have a database where one field's data type was defined as Text, but really needs to be changed to Number. I have a query that runs against the table which returns search results based on the input from the user in an unbound text box on a form. When I change the data type, and run my query, Access debugger is stopping on Me.Filter = strWhere Right now I have the field defined like this:

    If Not IsNull(Me.txtSearchMRN) Then
    strWhere = strWhere & "([MRN] = """ & Me.txtSearchMRN & """) AND "
    End If

    I believe something needs to be modified here to state that the data type has changed, but I may be way off. What other considerations should I take to ensure that changing the data type doesn't break anything else?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    if you have changed the string to a number in the query you would want:

    strWhere = strWhere & "([MRN] = " & Me.txtSearchMRN & ") AND "

  3. #3
    fainterm is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2013
    Posts
    17
    You're the man! Thank you sir.

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

Similar Threads

  1. Replies: 10
    Last Post: 12-15-2013, 11:52 AM
  2. Changing Text Colony in Access table
    By sdeckerjr in forum Access
    Replies: 1
    Last Post: 10-31-2013, 02:51 PM
  3. Replies: 1
    Last Post: 04-24-2013, 11:50 AM
  4. Replies: 2
    Last Post: 10-22-2012, 05:32 PM
  5. Replies: 3
    Last Post: 05-29-2012, 04:47 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