467,076 Members | 1,013 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,076 developers. It's quick & easy.

IF/Then

I'll be honest im not an expert at MS access...but

how do i properly form an if/then formula for access

[Box1] - random empty box that has random number
[Box2] - contains formula to a total in a subform footer.

I suppose in excell the formula would be

this is what i want in box 3
=if([box1]<[box2], "yes", "No"

if you understand please help.

thank You
Sep 3 '08 #1
  • viewed: 1085
Share:
1 Reply
puppydogbuddy
Expert 1GB
I'll be honest im not an expert at MS access...but

how do i properly form an if/then formula for access

[Box1] - random empty box that has random number
[Box2] - contains formula to a total in a subform footer.

I suppose in excell the formula would be

this is what i want in box 3
=if([box1]<[box2], "yes", "No"

if you understand please help.

thank You
Assuming that box1 and box3 are on the main main form and this code is executed from the main form using a button click. box2 is on the subform.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Yourbutton_Click()
  2. If Me.[box1].Value < Me.YourSubformControl.Form.[box2] Then
  3.               Me.[box3].Value = "Yes"
  4. Else
  5.               Me.[box3].Value = "No"
  6. End If             
  7. End Sub
Sep 3 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by avital | last post: by
19 posts views Thread by GMKS | last post: by
14 posts views Thread by lawjake | last post: by
4 posts views Thread by =?Utf-8?B?WmFyYm9yZw==?= | last post: by
15 posts views Thread by jzakiya | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.