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

From form to table back to form

100+
P: 158
I'm creating a database for a hospital, and i need a little help with the forms. I have the user enter in patient info (ie gender, weight) in one form, which stores it in a table tblPatient. Now i need to use the weight to perform some math in VBA whenever the checkbox chkTrauma is clicked.

Thank you
Matt
Apr 22 '08 #1
Share this Question
Share on Google+
3 Replies


mshmyob
Expert 100+
P: 903
Put your code in one of the properties of the checkbox (usually On Click or After Update), but depends on when you want the code triggered.

cheers,

I'm creating a database for a hospital, and i need a little help with the forms. I have the user enter in patient info (ie gender, weight) in one form, which stores it in a table tblPatient. Now i need to use the weight to perform some math in VBA whenever the checkbox chkTrauma is clicked.

Thank you
Matt
Apr 22 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
Like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub chkTrauma_AfterUpdate()
  2. If chkTrauma Then
  3.   'Code here if box is checked
  4. Else
  5.   'Code here if box is unchecked
  6. End If
  7. End Sub
  8.  

You probably need to include the Else in case the operator accidentally marks the record as a trauma patient, and then realizes they made a mistake. You'd use the Else clause to undo whatever calculation you'd run when it was checked.

Welcome to bytes!

Linq ;0)>
Apr 23 '08 #3

100+
P: 158
Thanks for the help that did it.
Apr 23 '08 #4

Post your reply

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