G
Guest
Have got 2 tables. Air Sales and Air Cancellation and along with associated 2
forms.
Both have field ie Product ID. I want that whenever i raise credit note in
cancellation table, i get Product ID automatically in form. Both invoice
table and cancellayion table are linked through transno( auto no in invoice
table).
For Cancellation form, its through Cancellation Query where invoice and
cancellation tables have been linked on Trans No.
When i put Dlookup in either before update event of form or on Exit event of
Product ID field, i dont get results and it comes as blank. Following is the
statements given by me:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim aProductID As Variant
aProductID = DLookup("Forms![Qry Cncl]![ProductID]", "Air Invoice",
"Tables![Air Invoice]![TransNo]" = "Forms![Qry Cncl![TransNo]")
Me![Cncl.ProductID] = aProductID
End Sub
Please advice. I have even put this is in on Exit event but this does'nt sho
results.
forms.
Both have field ie Product ID. I want that whenever i raise credit note in
cancellation table, i get Product ID automatically in form. Both invoice
table and cancellayion table are linked through transno( auto no in invoice
table).
For Cancellation form, its through Cancellation Query where invoice and
cancellation tables have been linked on Trans No.
When i put Dlookup in either before update event of form or on Exit event of
Product ID field, i dont get results and it comes as blank. Following is the
statements given by me:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim aProductID As Variant
aProductID = DLookup("Forms![Qry Cncl]![ProductID]", "Air Invoice",
"Tables![Air Invoice]![TransNo]" = "Forms![Qry Cncl![TransNo]")
Me![Cncl.ProductID] = aProductID
End Sub
Please advice. I have even put this is in on Exit event but this does'nt sho
results.