Results 1 to 7 of 7
  1. #1
    normie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    53

    Unbound box

    I need an unbound box on my report that will say "WARNING" if a bound box has a total that is above a certain amount

    example: if the total weight in the weight box is above 10,000 lbs I need a warning

    I tried IF but got no value

    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Where, in your report, does the weight box reside. Is it in a detail, header, or.. ? What is the name of the detail, header, or.... ?

  3. #3
    normie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    53
    Quote Originally Posted by ItsMe View Post
    Where, in your report, does the weight box reside. Is it in a detail, header, or.. ? What is the name of the detail, header, or.... ?
    It is in the detail it is just an unbound add in that I want to put the value 'WARNING" in

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    What is the name of the detail?

    Click the detail to highlight the detail. Check the detail's properties "Other" tab and post the name of said detail here, in this thread.

  5. #5
    normie is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    53
    Date Check Box = Date check
    Unbound box = Text 26

    The Date Check is a number the Outbound box needs to say "Warning" if the date check box has a total of more than 800

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Assuming the name of the detail section in your report is "Detail" and both TextBoxes are in this detail, you can place the following in your Detail's Format event of the VBA editor.

    Code:
    If Me.Date_check.Value >= 801 Then
    Me.Text_26.Value = "WARNING"
    Else
    Me.Text_26.Value = ""
    End If
    It is advisable to avoid spaces in names of fields.

    Alternatively, you can place an IIf statement within your unbound Text 26. You can search for examples of IIf statements and get help in the VBA editor's help files.

    It is not a bad idea to become familiar with details, headers, footers, and such when using reports. Reports are great tools for handling things like calculations. If you don't know the name of a detail and how it relates to various controls on your report, you are limiting your ability to exploit the reports possible features.

  7. #7
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I tend to put these types of calculations in the query for the report/form. In the query, you could add a column

    Code:
    txtWarn: IIF(YourWeightFieldName>10000, "Warning","")
    Then add the (calculated) field to the report.

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

Similar Threads

  1. Replies: 14
    Last Post: 05-13-2013, 04:27 PM
  2. Unbound Form
    By tia in forum Forms
    Replies: 2
    Last Post: 02-09-2012, 07:22 AM
  3. Unbound Text
    By cbrsix in forum Reports
    Replies: 16
    Last Post: 10-27-2011, 01:27 PM
  4. Unbound list box
    By waseemthonse in forum Forms
    Replies: 1
    Last Post: 11-02-2010, 07:36 PM
  5. Unbound form example
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-24-2010, 12:25 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