We have been using this Dlookup up throught Access2002 and it has worked
great. We upgraded some of our PCs to Access2003 and this code fails (a drop
down populates an adjacent textbox).


Private Sub PART_NAME_AfterUpdate()
Forms![ECOFORM]![PARTform]![PART NAME] = DLookup("[PartName]", "Parts", ,
"[PartNumber] = Forms![ECOFORM]![PARTform]![PART #]")
End Sub

I've tried re-writing it in various ways but haven't hit on the right
solution. Any suggestions?

Snowdog: Homer Lambrecht

RE: DLookup by Snowdog

Snowdog
Tue Feb 01 10:35:03 CST 2005

When I copied the original from Access I ended up with an extra "," Sorry.

Here it is again:


Private Sub PART_NAME_AfterUpdate()
Forms![ECOFORM]![PARTform]![PART NAME] = DLookup("[PartName]", "Parts",
"[PartNumber] = Forms![ECOFORM]![PARTform]![PART #]")
End Sub



"Snowdog" wrote:

> We have been using this Dlookup up throught Access2002 and it has worked
> great. We upgraded some of our PCs to Access2003 and this code fails (a drop
> down populates an adjacent textbox).
>
>
> Private Sub PART_NAME_AfterUpdate()
> Forms![ECOFORM]![PARTform]![PART NAME] = DLookup("[PartName]", "Parts", ,
> "[PartNumber] = Forms![ECOFORM]![PARTform]![PART #]")
> End Sub
>
> I've tried re-writing it in various ways but haven't hit on the right
> solution. Any suggestions?
>
> Snowdog: Homer Lambrecht