Building Form

Sonnyboy

New member
Local time
Today, 06:40
Joined
Sep 13, 2007
Messages
9
I have a project that I have been working on for a while. As I learn more, I make changes. I have a table named tblPermits, and the form is frmPermits. My table may need to be broken into parts, but I am not knowledgable enough to know or how to do it.


So far, I have modified the form so that the Permit number auto-increments, and changes with the fiscal year, and then makes the focus the "Project" name. So far, so good.

What I am trying to do now is to use checkboxes and conditional expressions to create results in calculated controls, then store the results in the table for archive purposes.

After completing the form I will work on designing a report that I will print in two copies, that will be issued as a building permit.

The checkboxes are:
3/4” Mtr, 1” Mtr, 11/2” Mtr , 2” Mtr, CitySewer
If the 3/4" Mtr checkbox is checked, I want a result in the Calculated Control [WtrMtr] to equal $400, and if the 1" checkbox is checked, $750 to be placed in the [WtrMtr] Calculated Control. If the Checkbox "CitySewer" is checked I want the results of an expression like "[Footprint]*.20 " to be placed in the Calculated Control [SewerTap].

Also, I have read that the result of calculated fields should not be placed in a table, but for historical reasons it might be quicker.

Thanks for your help

Sonnyboy
 
You can use VBA , put likes of this code in the click event of each checkbox:

If 34Mtrcheckbox = True Then
Me.WtrMtr= "400"
Else
If 3/4Mtrcheckbox= False Then
Me.WtrMtr= "400"
End If
End If


Crude code but may get you there... be careful what you call your controls. Certain 'restricted' characters will cause probs when using VBA eg '/'
 

Users who are viewing this thread

Back
Top Bottom