Thread: Thanks
View Single Post
  #6 (permalink)  
Old February 28th, 2006, 08:57 AM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

If you're talking about a form that is based on that table, and if you have a textbox that the person types in the number 1210, then on its After Update event you can put something like

Dim intWidth as Integer

intWidth = DLookUp("[Width]", "CostTable", "[Width] >= " & Me.txtWidth)

This will pull out the first width that is equal or greater than the width you entered into the textbox. Replace "CostTable" with real name of your table. I called the textbox txtWidth.

From there you can get the height and cost using the DLookUp function again.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote