Results 1 to 2 of 2
  1. #1
    Bergh is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2009
    Posts
    2

    Several problems

    Hi I have some problems. My english is not so very good so I hope that you understand.
    1. I have boxes that I should calculate the length and width on, if I have 4 boxes that is 398cm length and 198cm width. Can I make a VBA code to calculate this??
    I have two checkboxes to like this:
    Quantity * length = sum (4*398=1592)
    If one of the checkboxes is checked then it is /2 like this:


    Quantity * length = sum /2(4*398=1592/2=796)
    And if the second checkbox is checked then it is then width that should be calculated like this:

    Quantity * width = sum (4*198=792)
    And if both of the checkboxes I checked then it look like this:

    Quantity * width = sum / 2(4*198=792/2=396)
    And the sum that is longer than 1500cm will be red
    How do I do this VBA code??
    2. I have a number like 3 and when the calculated number is higher than number 3 then it will be red. (I have already made this calculate). But my problem is: I will make a report that only print the red numbers when I click on a button. (This has nothing to do whit the first question.)
    3. How can I get a unbound control on a report?

    See forward to your answers!!

    /Bergh

  2. #2
    Jim Doherty is offline Novice
    Windows XP Access 2000
    Join Date
    May 2010
    Location
    Derbyshire,England. UK
    Posts
    20

    Smile

    Bergh....with respect your last line concerns me a little. If you do not know how to put an unbound control on a report then you need to learn how to do that first on both forms and reports as it is the fundamental element of Access. The rest will follow namely learning about 'Calculated' controls on forms and reports, embedded expressions and calculations in queries amongst other methods.

    All of these calculations you speak about are achievable in VBA code. In short, you need to look at the IF statement or SELECT CASE statement to see how this deals with true false logic and practice with that.

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

Similar Threads

  1. OLE problems how to fix
    By miziri in forum Access
    Replies: 7
    Last Post: 04-29-2010, 06:18 AM
  2. Relationship problems????
    By geoffishere in forum Access
    Replies: 6
    Last Post: 02-07-2010, 04:01 PM
  3. Problems with [Group by] in SQL
    By GeedieZ in forum Access
    Replies: 1
    Last Post: 08-14-2009, 03:34 AM
  4. Validation problems...
    By dbDamo in forum Forms
    Replies: 1
    Last Post: 05-15-2009, 12:43 PM
  5. DSUM Problems
    By swampdonkey in forum Forms
    Replies: 2
    Last Post: 09-29-2006, 10:52 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