Dlookup need refresh

  • Thread starter Thread starter G Lam
  • Start date Start date
G

G Lam

Hi, I added an unbound text box, ShowPrice, in a form. The form's data
source is a table tblInvDet. I set the datas ource for the ShowPrice box as
following:

=Dlookup("UnitPrice", "tblPriceList", "PartNbr = Me!SkuNbr")

The ShowPrice box only shows the user the price for that part number. When I
type in the part number, the unit price do not displayed. I need to click
Record->Refresh to force the unit price to show up. The form is a datasheet
form.

What should I do to make the unit price come up without clicking any thing?

Thank you.
Gary
 
In the AfterUpdate event of the part number textbox, use code similar to
this:

Private Sub PartNbr_AfterUpdate()
Me.ShowPrice.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DLookup Problem Within A Subform 12
Median Calculation 19
Form question? 1
Using varible with Dlookup 3
dlookup problem 2
Form Question? Correction 6
DLookup 5
Lookup value from another table ado. 3

Back
Top