Format TextBox to Currency in a Form

Hi,
I am having trouble formatting textbox in a form.  
Here is a little background on what i did in a form.  I have a combobox that 
has all the company names.  I am populating textbox results by selecting 
company name from the combobox.  For Example, If i select CompanyA from the 
combobox then the textbox1 will populate its revenue.  But, its populating in 
a general number format without any decimals.  
I tried everything from changing the property in the textbox and the source 
table.  
But i have no luck getting the Currency in the format.

Can someone please help me with my isssue.  

Thank you,

Jay 
0
Utf
11/15/2007 8:45:01 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
2336 Views

Similar Articles

[PageSpeed] 2

Jay

If this were mine, I'd open the form in design view, click on the (textbox) 
control, click on the Properties Toolbar button, select the Format property 
and select Currency.

What happens when you try this?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jay" <Jay@discussions.microsoft.com> wrote in message 
news:4786CB2C-3B07-4B5A-AED9-737BF062888B@microsoft.com...
> Hi,
> I am having trouble formatting textbox in a form.
> Here is a little background on what i did in a form.  I have a combobox 
> that
> has all the company names.  I am populating textbox results by selecting
> company name from the combobox.  For Example, If i select CompanyA from 
> the
> combobox then the textbox1 will populate its revenue.  But, its populating 
> in
> a general number format without any decimals.
> I tried everything from changing the property in the textbox and the 
> source
> table.
> But i have no luck getting the Currency in the format.
>
> Can someone please help me with my isssue.
>
> Thank you,
>
> Jay 


0
Jeff
11/15/2007 9:18:57 PM
Jeff 
When i try what you suggested....it doesn't change anything.  It will still 
show up as general number format.  

"Jeff Boyce" wrote:

> Jay
> 
> If this were mine, I'd open the form in design view, click on the (textbox) 
> control, click on the Properties Toolbar button, select the Format property 
> and select Currency.
> 
> What happens when you try this?
> 
> Regards
> 
> Jeff Boyce
> Microsoft Office/Access MVP
> 
> "Jay" <Jay@discussions.microsoft.com> wrote in message 
> news:4786CB2C-3B07-4B5A-AED9-737BF062888B@microsoft.com...
> > Hi,
> > I am having trouble formatting textbox in a form.
> > Here is a little background on what i did in a form.  I have a combobox 
> > that
> > has all the company names.  I am populating textbox results by selecting
> > company name from the combobox.  For Example, If i select CompanyA from 
> > the
> > combobox then the textbox1 will populate its revenue.  But, its populating 
> > in
> > a general number format without any decimals.
> > I tried everything from changing the property in the textbox and the 
> > source
> > table.
> > But i have no luck getting the Currency in the format.
> >
> > Can someone please help me with my isssue.
> >
> > Thank you,
> >
> > Jay 
> 
> 
> 
0
Utf
11/15/2007 9:33:01 PM
So i found the solution thru our great memeber (Allen Browne) from this 
community.
So if the textbox is spitting out results based on combobox then you would 
type the following in the control source of the textbox:
CCur([ProductID].[Column](2)) 
And make sure the format of the textbox is Currency and it will work fine.

Thank you guys for all the help


"Jay" wrote:

> Jeff 
> When i try what you suggested....it doesn't change anything.  It will still 
> show up as general number format.  
> 
> "Jeff Boyce" wrote:
> 
> > Jay
> > 
> > If this were mine, I'd open the form in design view, click on the (textbox) 
> > control, click on the Properties Toolbar button, select the Format property 
> > and select Currency.
> > 
> > What happens when you try this?
> > 
> > Regards
> > 
> > Jeff Boyce
> > Microsoft Office/Access MVP
> > 
> > "Jay" <Jay@discussions.microsoft.com> wrote in message 
> > news:4786CB2C-3B07-4B5A-AED9-737BF062888B@microsoft.com...
> > > Hi,
> > > I am having trouble formatting textbox in a form.
> > > Here is a little background on what i did in a form.  I have a combobox 
> > > that
> > > has all the company names.  I am populating textbox results by selecting
> > > company name from the combobox.  For Example, If i select CompanyA from 
> > > the
> > > combobox then the textbox1 will populate its revenue.  But, its populating 
> > > in
> > > a general number format without any decimals.
> > > I tried everything from changing the property in the textbox and the 
> > > source
> > > table.
> > > But i have no luck getting the Currency in the format.
> > >
> > > Can someone please help me with my isssue.
> > >
> > > Thank you,
> > >
> > > Jay 
> > 
> > 
> > 
0
Utf
11/15/2007 9:55:00 PM
Reply:

Similar Artilces:

Currency and Numbers display
Under the currency category of Format Cells, some machines only display four choices for negative numbers, while others display five. There is no choice for red negative with a leading minus sign. I've gone through to check if it's a version related issue, but can't seem to replicate the situation. We have Office 2K on W2K SP4. Any advice would be appreciated. Thanks ...

How can I show multiple Pivotchart forms on the same screen at onc
I have a series of pivot charts created in Access and I'd prefer to be able to show them all at once on one screen. Normally I'd do this in Excell since it would be cake to sqeeze them all together but in this situation I need the conditional formatting of pivot charts that access provides. So is there a way to put all the charts on one "thing"? I've tried putting them as subforms on a new form but they just come up blank, same for trying to put them on a report. -Thanks Im sorry im not an expert on pivot charts but when you say Chart i believe it is a...

Access 2002 bug: "dynamic" forms problem
There was no respond to my original post in microsoft.public.access.forms (May 5th 2007) about a fortnight so I try it here... ��������������������������������� A while ago we had a discussion about A2002 (sub)form which changes dynamically from code (hide/unhide controls, change subfom's width, etc.). There's a problem if I make some changes in code when the form is open: if I save changes, A2002 saves controls positions & subform's size as well. This is a BIG A2002 BUG and it's really annoying. Why Access forms don't behave as Visual Basic forms? I don't want Acc...

formating of text file
i have problem while formating a text file into excel containing the below matter i want the "Bank reference", "Amount", "Information", "Customer details " and "bank clearing ID" in first row and the corresponding information below the corresponding headings. i have tried the use the custom in the filters and take the details into a next tab. everything is working, however only one line from the "information" and "customer details" is picking. Second line and the line after one blank line is also not pickin...

Open form at specific record
Hi I had asked before about how to make a value of a combo box depend on another, I received good information on what and how to do it, my question now is how do open a form from the second combo box at the chosen record. What I have now is a form "find contact" which has two combo boxes where I can choose a company and then a name from that company, from my command button I can run the query which find thew chosen entry but I would like to open the "contacts" form at the specific entry. my cmd button so far is Private Sub Run_Click() DoCmd.OpenQuery "qrycontacts&quo...

Help with Form
I have a continuos form as a subform. Is there anyway I can get selected fields in the last row of the subform to appear on the main form. Is this even possible. Thanks ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/community/en-us/de...

Generate number NOT using a form
Hi, I've searched hi an low on this site and others, and the nearest match was a question from Galaxykid in November. I'm running Office 2000 and have used the Template Wizaed to create a template that is used as a form to input data into another spreadsheet. I would like one field on the template (which appears as a spreadsheet NOT an Excel Form) to generate sequential numbers for each new record that is entered and saved using my template. I know it can't be that hard but I've been trying to figure this out for two days! Help!!!!! Thanks in advance. Davis Try loo...

Import Data using Forms
Hi, Can anyone tell me how I can set up a form to import an excel sheet into an exisiting table in access? Thank you!! You can use the TransferSpreadsheet Method to import a spreadsheet. The click event of the button would run the code you write for the import. "carolini" <carolini@discussions.microsoft.com> wrote in message news:A30B2F52-96CD-421B-A940-A200A0D129CF@microsoft.com... > Hi, > > Can anyone tell me how I can set up a form to import an excel sheet into > an > exisiting table in access? > > Thank you!! > On Mon, 23 Apr 2007 12:24...

conditional format on first & last digit on 3 digit cell data
How to create conditional formatting and color shade cells which contains the first and last digit which I'm looking at regardless of any order on three digit cell data? Use a formula of =AND(LEFT(A2,1)="5",RIGHT(A2,1)="7") as an example -- __________________________________ HTH Bob "caprey" <caprey@discussions.microsoft.com> wrote in message news:68C65158-A525-4C3C-A493-2AA38398CA7E@microsoft.com... > How to create conditional formatting and color shade cells which contains > the > first and last digit which I'm looking at regar...

Protect Formatting #2
Dear Andy, firstly thanks for your response.. But i think yo misunderstood my question.. What i wanted to protect was the PAGE SETU - means the margin settings, fitting to 1 page etc.. The cells and dat protection i know can be protected as you said.. I just want the PAGE SETUP to be protected.. Means irrespective of wha they update in sheet, if the sheet is set to fit 1 page wide x 1 pag tall it should not allow the other users to change this setting.. Possible..?? cheers manaadiar :confused -- manaadia ----------------------------------------------------------------------- manaadiar&...

How do I retain formating while resizing page?
I have a booklet I redo periodically. This year we'd like to resize the booklet from a 5"x7" to a pamphlet size (to fit inside a #10 envelope). Currently it's publishing in booklet form with 24 pages. The number of pages changes from year to year and it is done with a card stock cover so simply changing to a pamphlet form will not work. Unless you are going to maintain the same proportions, it's not going to be easy. It'll have to be done manually. -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" ...

Need help with sql and form
I am trying to get an average from SumOfPalletCount and rs.recordCount but I get errors no matter how I try and do this...Is there a better way to do this? *********What I currently have in a qrytest:*********** PARAMETERS [DaySelected] DateTime; SELECT RecyHistory.DateRec, Sum(RecyHistory.PalletCount) AS SumOfPalletCount FROM RecyHistory GROUP BY RecyHistory.DateRec HAVING (((DatePart("w",[RecyHistory].[DateRec]))=DatePart("w",[DaySelected]))); ******And Form coding:********* Private Sub DateRec_GotFocus() Dim qdf As DAO.QueryDef Dim rs As DAO.Recordset ...

Textbox question?
I am using a userform to have data transfered to a sheet. I currently use the code below to send it to a worksheet but what I would like to have happen is for it to add the total of the textbox to the total already in the cell. How do I do that? Thanks Greg Here is the code R = 3 'or whatever desired row variable Sheets(2).Cells(R, 5).Value = TextBox4.Text "Greg B" <laptopgb@ihug.com.au> wrote in message news:d7n44v$j7i$1@lust.ihug.co.nz... > I am using a userform to have data transfered to a sheet. I currently use > the code below to send it to a worksheet b...

2 textbox questions
hi... I have a form where I have a txt box where i want to accept from user only percentages. How can I make a check in this case? I wanted user to know that he will enter percentages in it. So what i thought was that when user enters the number in the textbox and when he moves away from the textbox a "%" sign should appear. how can i do that? secondly i wanted to make my textbox deactivated and grayed. That is when he is selecting an option A then the textbox in activated and and when he sects option B the textbox is visible but grayed. i don't to hide it. thanks Monika H...

define where form opens
Hi, Is there a way to define where exactly on the screen a form (or report or message box) is going to open? Look up MoveSize in VBA Help, not Access Help. Wim wrote: >Hi, > >Is there a way to define where exactly on the screen a form (or report or >message box) is going to open? -- RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via http://www.accessmonster.com Wim, Use this code, possibly on the Open event of the form: DoCmd.MoveSize x, y .... where x and y are the horizontal an...

View Account Information from a Custom Form
I want to view account info from a custom form as reference data. This would be a little like an IFrame I guess. I only need a read-only view of the account data, but I still would like it available from a tab. Any suggestions? -- Mark Add an IFrame with a link to: http://server/_forms/readonly/readonly.aspx?obTypeCode=1&id={guid here} hope this helps, -- Ronald Lemmen Avanade Netherlands http://ronaldlemmen.blogspot.com/ "Mark" wrote: > I want to view account info from a custom form as reference data. This would > be a little like an IFrame I guess. I only ...

Form error "Type Mismatch"
Hi, In my time tracking db, I have a hidden form that opens immediately after the switchboard "fWorkLogHidden". If someone forgot to log out of the db (by filling in StopTime) the previous day, there is another form "fWorkLogPreviousDay" that opens from the FormLoad event of the hidden form, requiring stop time to be filled in the next time the db opens. Below is code I currently have in place, but get error "13 Type Mismatch". DoCmd.OpenForm "fWorklogpreviousday", acNormal, , "stoptime isnull" And "starttime BETWEEN Date() and (Da...

Unknown Error from Appointment form.
What's wrong? I use this custom appointment form on Office 2002 and get an Unknown Error dialog box when responding to a meeting request. Replying directly is OK, but obviously doesn't affect the calendar. The problem is known to be fixed by SP3 for Office 2000, but like I say, we're using 2002. This is a showstopper for us. The form persists most appointment information to a sql database for reporting off, and though it's not ideal (and has been a voyage of discovery), it is reasonably effective in concept. All clients have the required network libraries and drivers. http://b...

Saving form takes a long time
Hi all, In Access2003 I have a frontend of about 2MB (backend is about 1,5 MB and has about 8 tables). The frontend consists of 4 forms, 6 reports, 2 modules, and some queries. The biggest and main form in the frontend seems like a normal form to me. It has a subform in it and in my eyes not too much code. However, when I make a simple change to the form, for instance making a field bigger or add a button with 3 lines of code, and I want to save the form it takes 1 to 2 minutes to save. Although there are no signs of a corrupt database I tried compact and repair. This action is done pr...

Error on saving a form, when few extra controls are added dynamica
Hi, I am dynamically adding a readonly textarea on a CRM form, which is populated with some data, based on few conditions at runtime. Using JavaScript, I am able to add textarea at dynamically. But when user clicks on "Close" button, I get runtime error and data is not saved. Code to add fields at runtime: objAddress = oCurrentTab.appendChild(document.createElement('textarea')); objAddress.id = 'objAddress'; objAddress.readOnly=true; objAddress.innerText = "Some Text which is to be displayed"; Can anyone point me to what I am doing wrong? Also i...

Form Field/Function problem
I have 4 fields on my main form. The 4th field is controlled by a function. The function automatically adds the scores from the other 3 fields and puts the total score in the 4th field. All of that works great. The problem I'm having is that I need the color on that 4th field to change if any of the other 3 fields are below 60 points. I've tried adding some code that would change the color, under the 'After Update' and 'After Change' property field and I can't get it to work at all. Thank you in advance for any help! Place a procedure like this air co...

Keeping multiple forms open
In Access 2000 I was able to keep several forms open and switch between them using the taskbar at the bottom of the screen, but Access 2007 will only allow me to keep one form open. Is there a solution to this? Thanks for any help. Dudley Tabs for each open item are found to the right of the navigation pane under the ribbon. "Dudley" wrote: > In Access 2000 I was able to keep several forms open and switch between them > using the taskbar at the bottom of the screen, but Access 2007 will only > allow me to keep one form open. Is there a solution to this?...

formatting date
Hey, is there any way to format this date 2005 so that it only shows the year number 5 thanks If you select the cells you want in date format, then right click on them and select Format Cells and select the "number" tab, then select Category, Date, you'll see all the date formats that come with XL. I used to know how to create custom date formats, but it's been so long, I don't remember how any more. ...

What is the easiest way to embed a pic to a form?
I current ly have a database which a user can embed a pic into an OLE object by right clicking and pasting a pic into the box. This box has the control [pic]. But the fpics are taking up too much space this way. What would be the easiest and simplest way for a non Access user to insert a pic into the OLE object box in this form? I am reaching the database max size and I need a solution and can't find another simple way for the user. Any suggestions much appreciated! "Roby" <Roby@discussions.microsoft.com> wrote >I current ly have a database which a user can emb...

Carriage return in textbox
Does anyone know how to insert a carriage return in a textbox just using the keyboard? I thought it was Ctrl+Enter or Shift+Enter, but no luck. Thanks Marcie ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Marcie, Check the properties of the textbox and make sure that Multiline and EnterKeyBehavior are set to true. HTH, Katherine "Marcie" <Marcie.wnzqz@excelforum-nospam.com> wrote in message news:Marcie.wnzqz@excelforum-nospam.com... > > Does...