G
Gib
I am new to this so please bare with me. I have a form
with a Combobox that has an After Update [Event Procedure]
as follows:
'Find the record that matches the control.
Dim rs As Object
Dim varX, TotReq As Variant
Dim PlntID, PlntName, LvlCdeID, LevCdDespt As Fields
Set rs = Me.Recordset.Clone
rs.FindFirst "[CommodityID] = '" & Me![CommNo] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'Get Variables
PlntID = DLookup
("[PlantID]", "tblMasterList", "[CommodityID] = CommNo")
PlntName = DLookup("[PlantName]", "tblPlant", "[PlantID]
='PlntID'")
PlntID is always correct.
PlntName is always 'Null'.
Any Sugestions?
Thanks
with a Combobox that has an After Update [Event Procedure]
as follows:
'Find the record that matches the control.
Dim rs As Object
Dim varX, TotReq As Variant
Dim PlntID, PlntName, LvlCdeID, LevCdDespt As Fields
Set rs = Me.Recordset.Clone
rs.FindFirst "[CommodityID] = '" & Me![CommNo] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'Get Variables
PlntID = DLookup
("[PlantID]", "tblMasterList", "[CommodityID] = CommNo")
PlntName = DLookup("[PlantName]", "tblPlant", "[PlantID]
='PlntID'")
PlntID is always correct.
PlntName is always 'Null'.
Any Sugestions?
Thanks