Results 1 to 7 of 7
  1. #1
    Davidyam is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    14

    Text becoming numbers

    Hi,

    I am really new at MS access and I have a problem and was hoping if anyone could help me. When I do a data entry on my table, the text in my table would appear to be a number in my form and vice versa. May I know what I should do to ensure that both my table and form would appear as text and not numbers. By the way, this problem occur when I am using Microsoft access 2007.



    Thank You very much.

    Regards,
    Yam

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I'm not sure I understand what your problem is; what is the data type of the field in your table - Text or Numeric? What do you mean when you say the data appears as text and not numbers? It sounds to me as if you are only seeing differnces in justification (left or right) between the form and the table.

    Can you supply more information, please?

    John

  3. #3
    Davidyam is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    14
    Hi,

    First of all thanks for replying.
    I have created a data entry form which consist of text boxes and combo boxes. This combo boxes are link from another table, for example types of Aircrafts where i can select the different types of aircrafts instead of typing out one by one. This table only has two columns, mainly ID and the different types of aircrafts. However when I look back to my table after entering data from my form, under the Types of aircraft, the ID number shows up instead of the different types of aircrafts which is in text.

    So actually what did i do wrong or why is the ID number showing up instead of text.

    Thank You very much.

    Regards,
    Yam

  4. #4
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    I assume the combo box has two columns - ID Number and Aircraft type, in that order. Look at the properties for the Combo Box control - if you want the aircraft type (column 2), and not the ID, to be in the table field, set the Bound Column property to 2.

    This should yield the results you are looking for.

    John

  5. #5
    Davidyam is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    14
    Hi John,

    Thanks so much. This actually solves my first problem.I have another question hope you don't mind.

    I have created a Advance search form which consist of multi-fields similar to my table. This form is a split form where it allows me to search in the form header and the bottom table filters out the results that I want. The vba code which pulls out when I search for text and dates are fine, however the combobox is giving me trouble again. Below is the vba code for the combobox which I have entered which is similar to what I have found online.

    If Not IsNull(Me.cboreg) Then
    strWhere = strWhere & "([Regions] Like ""*" & Me.cboreg & "*"") AND "
    End If

    When I click my search button, this error shows up and I am not sure where i have done wrong.

    Syntax error (missing operator) in query expression '([Type of aircraft] = B747)'.

    Thanks in advance.

    Regards,
    Yam

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You show code for Region but the error refers to aircraft. That is confusing.

    Have you step debugged? Follow the code as it executes. See where code deviates from expected behavior, fix, repeat.
    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
    Davidyam is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    14
    Hi John,

    Thanks for helping, I have solved my problem with the help from the example from Allen Browne posted online. I really appreciate your help. Thank you once again.

    Regards,
    Yam

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

Similar Threads

  1. querying and converting text to numbers
    By hollyh in forum Queries
    Replies: 2
    Last Post: 09-01-2011, 12:39 PM
  2. Random Text and Numbers
    By Mclaren in forum Programming
    Replies: 5
    Last Post: 11-05-2010, 04:34 AM
  3. Replies: 2
    Last Post: 08-12-2010, 11:21 PM
  4. Convert text to numbers
    By Mclaren in forum Programming
    Replies: 2
    Last Post: 05-02-2010, 01:36 PM
  5. Convert text to numbers
    By randolphoralph in forum Access
    Replies: 1
    Last Post: 03-21-2010, 10:33 AM

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