Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA to Change a "Check Box" value

Status
Not open for further replies.

Tuttle2

MIS
Aug 8, 2001
5
0
0
US
I am currently working on a project and would like to have the value from one table (1 or 0) Spark the change in a check box of another table. If the first table is a "1" then the Second tables check box is "Yes"...

I have been attempting this with an IF...Then statement with poor results

Mark
 
If Me.chkCPR = 1 Then
Me.InitalAssessment = "Yes"
End If
If Me.chkACLS = 1 Then
Me.InitalAssessment = "Yes"
End If
If Me.chkEMT = 1 Then
Me.InitalAssessment = "Yes"
End If
If Me.chkCPR = 1 Then
Me.VitalSigns = "Yes"
End If

There must be an easier way to do this. I am trying to compare different dates for those that fall within a 2 year window and then assign the value of "yes" to a checkbox in Access. Using an IFF statement in the query I have been able to get a value of "1" or "0" assigned to the "chkCPR" box for example. Now I want Access to assign a yes/no value to a checkbox.(...depending on the value returned from the date evaluation) I have had some success so far by placeing this code into the "On Current" event in a form, but I have to "cycle" throught the indiviual records for the code to affect all the records.

Any sugestions would be helpful
Thanks,
MArk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top