Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Invoicing    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Adding Product from Combo Box
Gayle Alley 
      
2 years ago
In my OrderDetailsF, I added the Product Combo Box (in my example, it is called ModelNameCombo) and added the Add Button with the lines in the Code Builder to get the info from the Model Name ComboBox - everything works great.  Thank you!  

I have just one issue-the dollar amounts come in as a whole number with no decimals and no dollar sign.  The format on the form is set to currency and if I look at the columns in the combo box, they show up as currency for the 3 fields that are dollar amounts.  What am I missing?

DoCmd.GoToRecord , , acNewRec
    ModelID = ModelNameCombo
    ModelName = ModelNameCombo.Column(1)
    Builder = ModelNameCombo.Column(2)
    FramingAmt = ModelNameCombo.Column(3)
    BuckOpeningAmt = ModelNameCombo.Column(4)
    WindowWrapAmt = ModelNameCombo.Column(5)

Thanks for any help you can provide.  I am fairly new to Access so any assistance you could provide is greatly appreciated.
Sami Shamma  @Reply  
             
2 years ago
Send screenshots
When you say the dollar amount comes in, comes in where? Are you moving it to a field? is that field format as currency?
We need more information in order to help you
Gayle Alley OP  @Reply  
      
2 years ago
Thank you for your reply. I no longer have a screenshot as I am trying something different although I may come back to this.  I was using VB with an Add Button to work with the ModelNameCombo.

DoCmd.GoToRecord , , acNewRec
    ModelID = ModelNameCombo
    ModelName = ModelNameCombo.Column(1)
    Builder = ModelNameCombo.Column(2)
    FramingAmt = ModelNameCombo.Column(3)
    BuckOpeningAmt = ModelNameCombo.Column(4)
    WindowWrapAmt = ModelNameCombo.Column(5)

The field was formatted as currency, however, when the amount populated that field it would just come in as 750 instead of $750.00.  If I erased the dollar amount and retyped the dollar amount in the field, then the amount would show as $750.00.  That was unexpected. I was attempting to keep previous order prices from changing when the Model Prices changed for future orders.
Sami Shamma  @Reply  
             
2 years ago
We still need screenshots of the new setup
Kevin Yip  @Reply  
     
2 years ago
Hi Gayle, if your form field is unbound, then it won't get the currency format from the combo box's column.  Combo box columns are *text*.   They may look like currency, but you will only get the textual data out of it.  You have to format it as currency yourself with extra code, such as the following.  Any of the following should be able display currency format in your text box:  

    Me.Text2 = CCur(Me.Combo0.Column(1))
    Me.Text2 = CSng(Me.Combo0.Column(1))
    Me.Text2 = CDbl(Me.Combo0.Column(1))
    Me.Text2 = Format(Me.Combo0.Column(1), "Currency")

P.S.  If the form field is bound, then it's different.  The field will always get the formatting as specified in the underlying table.
Gayle Alley OP  @Reply  
      
2 years ago
Thank you very much Kevin.  That is very helpful.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Invoicing.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 2:54:47 PM. PLT: 0s