Results 1 to 7 of 7
  1. #1
    desibabu90 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    39

    Formating Textboxes

    I am pushing data to textboxes from cascading combo boxes. The data is not formatted when it it in the combo box and I have set the textbox to be formatted (currency, general number, etc.) but the numbers still show up as "raw" data and not converted..

    is there any way I can format the data when i am calling them out from the query to the combo box.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Have you tried formatting the record source for the combo boxes?

  3. #3
    desibabu90 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    39
    the problem is that the record source is a locked table because the information is coming from an oracle database. I cannot change anything on that linked table and even though i have formated the data in a query (record source) it doesn't carry the format into the form.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    by pushing I'm assuming you mean the text boxes are unbound if so you can do something like

    me.textbox = format([Fieldname], "Currency")
    or
    me.textbox = format([Fieldname], "General Number")

    and it should work ( haven't tested in particular)

  5. #5
    desibabu90 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    39
    Quote Originally Posted by rpeare View Post
    by pushing I'm assuming you mean the text boxes are unbound if so you can do something like

    me.textbox = format([Fieldname], "Currency")
    or
    me.textbox = format([Fieldname], "General Number")

    and it should work ( haven't tested in particular)
    it didnt work for me...
    let me know if I am doing something wrong:

    I put that code in the After Update of the textbox.
    changed "textbox" to the actual name of my textbox
    changed "Fieldname" to the actual field name that is coming over from the record source.

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    What type of form are you using, bound or unbound?

    If it's bound you set the format in your query

    FieldConverted: format(fieldname,"currency")

    if it's unbound don't use the after update event, create the format as you're populating the data.

  7. #7
    desibabu90 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    39
    the form was not bound but now i bound it to a table with blank fields and was able to format the textboxes by using the fields in the table as control source.

    thanks!

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

Similar Threads

  1. Formating report
    By Bajaz001 in forum Reports
    Replies: 3
    Last Post: 04-17-2011, 01:29 AM
  2. formating field
    By slimjen in forum Access
    Replies: 9
    Last Post: 01-11-2011, 04:46 PM
  3. Formating string
    By Alex Motilal in forum Reports
    Replies: 7
    Last Post: 12-10-2010, 06:09 AM
  4. Formating a query
    By lmp101010 in forum Queries
    Replies: 2
    Last Post: 08-17-2010, 05:26 PM
  5. Querry formating
    By Zoroxeus in forum Queries
    Replies: 0
    Last Post: 03-07-2006, 11:00 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