Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    11

    Unanswered: Creating An Expression

    Hi all,

    can someone teach me how to create an expression? I went to forms in design view, then right click on the text box I want, then go properties, then created an expression like this:

    =Int([DonationAmt]+0.99)

    [DonationAmt] is a field in my table as well as my form, both named Donor_List. It is set to number, integer, format: currency, 2 decimal place. But the above expressions doesnt seem to work. Someone please help me asap... Please...

  2. #2
    Join Date
    Aug 2003
    Posts
    47
    Why don't you set table field and form's control type to Currency? You're converting it to currency anyway. You can convert Currency back to Interger by using 'Val' function. Integer data type can only take whole numbers not decimals.
    F..ck it, gimme a beer... Jimi Hendrix RULES!

  3. #3
    Join Date
    Jan 2004
    Location
    Norwich UK
    Posts
    20
    Is your form created from a table via the wizard?

    If not the form may not know which table it's actually looking at. You may have to tell it if not -->

    =Int([this table].[DonationAmt]+0.99)

    Or something like that

  4. #4
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    I'm kinda concerned (as much as a forum person can be) about your DonationAmt. Sup is right, Integer values cannot take decimals, regardless of what table design you put in. You need to either use Currency (as suggested and prob best), Single, or Double. Otherwise 4.50 looks like 4 and 4.51 looks like 5.
    All code ADO/ADOX unless otherwise specified.
    Mike.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •