Hi,
I have a Purchase Order Subform which contains the Order lines listing the different articles.
I would like the Subform to display each article’s description.
I have the following code in the on current event of the subform (copied from one of the Northwind examples) and on the after update event of the Article Number .
The problem: If for example I have 4 different articles, it shows the same description for each of the 4 articles, instead of showing each article’s own description.
How can I force each line to show its own Article description?
Private Sub Form_Current()
Dim strFilter As String
strFilter = "Artno = '" & Me!PuLineArtno & "'"
Me.txtDescr = DLookup("Desc", "tblArticle", strFilter)
End Sub
Private Sub PuLineArtno_AfterUpdate()
Dim strFilter As String
strFilter = "Artno = '" & Me!PuLineArtno & "'"
Me.txtDescr = DLookup("Desc", "tblArticle", strFilter)
End Sub
Thanks in advance.
I have a Purchase Order Subform which contains the Order lines listing the different articles.
I would like the Subform to display each article’s description.
I have the following code in the on current event of the subform (copied from one of the Northwind examples) and on the after update event of the Article Number .
The problem: If for example I have 4 different articles, it shows the same description for each of the 4 articles, instead of showing each article’s own description.
How can I force each line to show its own Article description?
Private Sub Form_Current()
Dim strFilter As String
strFilter = "Artno = '" & Me!PuLineArtno & "'"
Me.txtDescr = DLookup("Desc", "tblArticle", strFilter)
End Sub
Private Sub PuLineArtno_AfterUpdate()
Dim strFilter As String
strFilter = "Artno = '" & Me!PuLineArtno & "'"
Me.txtDescr = DLookup("Desc", "tblArticle", strFilter)
End Sub
Thanks in advance.