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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The first but not the harder

Status
Not open for further replies.

Cantor

Programmer
Apr 27, 2000
28
0
0
CA
I have 2 fields in my form: area_ID and surface. I want when users enter the area ID in the field area_ID (of course) the field surface become updated with my DataBase.<br><br>Is this possible?<br><br>Thanks in advance and sorry for my english: I begin in Access but in English too!
 
In the AfterUpdate event of the Area_ID field, put some code to calculate the surface area and update the surface field.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;[Surface] = (Your calculation here)<br>
 
The area_ID and the surface are in the same table (tblArea).<br>So, when user enter the area, in the AfterUpdate event I write the following code:<br><br><font color=red>Private Sub area_ID_AfterUpdate()<br>&nbsp;&nbsp;&nbsp;&nbsp;[surface] = DLookup(&quot;area_surface&quot;, &quot;tblArea&quot;, &quot;area =[area_ID]&quot;)<br>End Sub<br></font><br><br>The surface should appears in the surface field of my form, no? What's wrong with this code?<br><br>Any help is welcome,<br>Cantor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top