473,385 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

From form to table back to form

158 100+
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
3 1143
mshmyob
904 Expert 512MB
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
3,532 Expert 2GB
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
Jollywg
158 100+
Thanks for the help that did it.
Apr 23 '08 #4

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

Similar topics

5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
1
by: Jason | last post by:
I have succussfully ran the code below from a module. The code runs SQL update statements from a memo field in a table, called tblSQL. The field ! (Line 11) allows you to filter out the records in...
1
by: RC | last post by:
I have an Access 2002 database with many tables and forms (but just to keep things simple, let's say the DB has one Table "Table1" and one Form "Form1"). I have managed to cobble together so much...
3
by: Harry | last post by:
Hi, Can anyone help. I have a asp.net page (c#), with two panels, both of which have asp:textboxes on. When I press the first button, the second panel shows fine. When I press the button in...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
7
by: Sam | last post by:
Hello All, We want our Call Service Representatives to be able to go back and view all the records in a table on a form. When closing and re-opening the form the form starts out as record 1 of 1...
2
by: sujith.bolar | last post by:
Hello I am using a <form method="post"to submit values to the processing agent. If the processing agent returns an error, I call the history.go(-1) or history.back() function to reload the page....
3
by: melnhed | last post by:
---Report the current filtered records from a Form--- Hello All, I've seen this topic discussed before, but the solution described then doesn't work in my particular case. My Config: ...
1
by: assgar | last post by:
Hi I was using a schroll bar to display multiple rows of dynamically created from database records. The scrolling was not displaying the data properly so I have decided to use pagination. The...
12
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.