By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,640 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,640 IT Pros & Developers. It's quick & easy.

IF/Then

P: 2
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
Share this Question
Share on Google+
1 Reply


puppydogbuddy
Expert 100+
P: 1,923
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.