Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

The first but not the harder

The first but not the harder

The first but not the harder

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.

Is this possible?

Thanks in advance and sorry for my english: I begin in Access but in English too!

RE: The first but not the harder

In the AfterUpdate event of the Area_ID field, put some code to calculate the surface area and update the surface field.

    [Surface] = (Your calculation here)

RE: The first but not the harder

The area_ID and the surface are in the same table (tblArea).
So, when user enter the area, in the AfterUpdate event I write the following code:

Private Sub area_ID_AfterUpdate()
    [surface] = DLookup("area_surface", "tblArea", "area =[area_ID]")
End Sub

The surface should appears in the surface field of my form, no? What's wrong with this code?

Any help is welcome,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close