Autofill from 2 sources

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I will do my best to explain what I'm trying to do. I think this is a little
different than past autofill questions, as I've read all of them already.

I am trying to build a form that will autofill transportation rates, based
upon the choosing of a person. I have 2 tables: First is called 'tblDIM'
and has fields Material (which has a listing of all products that could be
shipped), and the second is 'DIM' (which is the dimensional weight). My
second table has 3 fields: Mode (the type of freight service...overnite, 2
day, etc...), Lbs (all different weights up to 1,000 lbs and is the DIM), and
Rate (the rate for that specified Mode and weight).

Here's what I would like my form to do. Have a drop-down box for Material,
where someone choosing what they want to ship, and a drop down box for Mode,
where they choose the type of service. And then from these, I would like 2
things to populate: DIM (which comes from Material) and Rate, which comes
from the Service that was selected and the DIM that is associated with that
product.

I may not have explained this completely perfect, but think I covered it.
I'm knew to doing forms, so that's why this is lengthy.

I would appreciate any help,

Troy
 
hi,
here is a sub i wrote to fill in the part discription
after i entered the part number. if i read write this is
about what you are looking for. just change my names for
your names.
Private Sub txtParentID_BeforeUpdate(Cancel As Integer)

If IsNull(Me!txtParentID) Then
Cancel = True
Else
Me!txtDesc = DLookup
("[ItemName]", "IMA", "[IMA_ItemID] ='" & Me!txtParentID
& "'")

End If
End Sub
note: the like me!txtDesc wrapped big time. all of the
text to end if is 1 line.
 
Back
Top