Results 1 to 6 of 6
  1. #1
    gene_yuss is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    13

    Math in a field and storing the values in a field.

    I have a Pricing Table, different Customers have different pricing and the end user selects a "Format", like large print or braille, based off a combo box.


    Is there a way to have Access pull the correct price per customer based off the dropdown?

    Any ideas or links would be great.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Yes, requires code (macro or VBA, I use only VBA). Data entry must be on a form, not directly to table (unless maybe a data macro can be coded to do this, I haven't used data macros). If the price field you want to save value to is part of the form's RecordSource, in combobox AfterUpdate event, could simply be:

    Me!Price = Me.comboboxname(0)

    Combobox column index starts with 0 so column 1 is index 0. If the price is in a column of combobox then reference that column by its index.
    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.

  3. #3
    gene_yuss is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    13
    I tried to impalement that without thinking it through. Your advice about how to pull this off would be great.

    Customer Name Customer ID Process And Redirect Price Logging Markup Per Page Markup % Per Page Large Print Price/Page Braille Pages Price/Page Braille Translation Price/Page Emboss_GFX Price/GFX PrintingCostPerMin AudioTapeCostPerMin
    Recipient 1


    $6.50 $1.60 $6.50 $1.60 $0.25 $1.60


    so the value of a field would change depending on what "format" is on the invoice. I dont see a way to do this without altering my table.

    Product Format Comment
    Audio Tape Audio tape product format
    Braille Braille product format
    CD Compact Disc/DVD format
    Diskette Computer diskette product format
    Email Email product format
    Large Print Large Print product format
    Oral Presentation Material should be orally presented
    Process Redirect Process Redirect format
    Special Project Category for future additional formats

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Can you provide project for analysis?
    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.

  5. #5
    gene_yuss is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    13
    Quote Originally Posted by June7 View Post
    Can you provide project for analysis?
    You bet. Anything you could help with. I have three things to finish by tomorrow or we aren't going to make payroll. I appreciate the time you spend on the forums. Many of your posts have helped me. Thanks in advance.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Hope this issue has nothing to do with payroll deadline because it is already late and I need more info.

    I don't really understand how Product format impacts pricing.

    If user selects Email, how does that factor into the price of Computing/Taping Time or Materials Used or Other Services or Shipping?


    Also, why is the DefaultValue for Computing/Taping set to Minutes;Labor? These are two rows in the combobox list.

    Are you printing form as invoice instead of creating a report to do this?
    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.

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

Similar Threads

  1. Math error in calculated field
    By nashgas in forum Queries
    Replies: 2
    Last Post: 04-03-2012, 11:49 AM
  2. Replies: 3
    Last Post: 02-14-2012, 09:43 AM
  3. Storing Elapsed Time in a Field
    By andybuck86 in forum Access
    Replies: 1
    Last Post: 10-08-2011, 05:07 AM
  4. Use a lookup field to influence values in another field
    By nathanrt in forum Database Design
    Replies: 3
    Last Post: 01-13-2011, 03:40 PM
  5. simple math coding for form field??
    By RCBNewbee in forum Programming
    Replies: 7
    Last Post: 07-13-2009, 08:30 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