Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Format Problem

Status
Not open for further replies.

khwaja

Technical User
Aug 27, 2001
431
AU
I am using a combo box to select a value (eg region number), which in turn updates another combo box with relevant annual sale using following code:

Private Sub txtRegion_AfterUpdate()
Me!txtAnnSale.Requery
Me!txtAnnSale = Me.txtAnnSale.Column(0, 0)
End Sub

txtAnnSale is an unbound control listing sale figures from an underlying query for specific region after being updated in terms of the region.

The issue is that the unbound field (txtAnnSale) correctly lists all sale values in currency format but the value shown in the field (when combo box is not clicked down)has almost no formatting. I have checked table and query and annual sales is shown as currency.

Could someone help me in getting the format of combo box right?

I hope I am clear enough but if not please let me know and I can email a sample.

Cheers

 
The issue is that the unbound field (txtAnnSale) correctly lists all sale values in currency format but the value shown in the CONTROL (when combo box is not clicked down) has almost no formatting. I have checked table and query and annual sales is shown as currency.
("Fields" appear in tables - not on forms )

Yu need to set the Controls own Format property but opening the form in design mode and opening the properties dialog box. Then click on the combo box and in the Format property put "Currency".


'ope-that-'elps.




G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Thanks LittleSmudge. I guess I should have been more lucid on this. All unbound controls including the one I used as an example have been given the right formats. I even went further to assign the right format in the local query mode for drop down list (then one that appears when hit the build button next to row source property) but formats are accepted only until you close the query window.

I look forward hearing from you soon. If necessary and if it is OK with you, I can email a cut down version of the DB for your review. I am using Access 97.

Cheers

AK
 
Okay AK.

Send a note to the address below and I'll reply with a different address for you to send the thing to.

G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
There would be 2 reason when u are taking value from the table check whether the value is in which Data Type and 2) Check whether the combo box properties-->Format-->Format whether it has currency ot not
-kaushal
 
Thanks Kaushal.

I have verified formats at all possible points, ie table, query, and combo box and it has currency format everywhere. LittleSnudge has kindly consented to look at the DB which I have already emailed. Hope he would be able to resolve this. I will share the findings.

Regards

AK
 
LittleSmudge
Have you looked at the Personal Profile link (Top Left of Page) recently? There is some new guidelines out on the use of signature files which may affect you.
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top