Dlookup on form

B

Bill Pauley

Hi All,
I am entering therapist visits to patients on a form. The form feeds a table
storing the patient visits for billing. The following code is working well
except when an error is made that requires the COid to be changed. The visit
rate (CurrRateAmt) remains the same, instead of changing to the new rate for
that company.
I would like the (CurrRateAmt) to change if the COid changes. Now I have to
re-enter the same RateTypeID to get the rate to change. Any suggestions?

Private Sub RateTypeID_AfterUpdate()
Me!CurrRateAmt = DLookup("RateAmt", "CoRatestbl", "CoID=" & CoID & " AND
RateTypeID=" & RateTypeID)
Me![txtCurrRateAmt].Requery
End Sub

Private Sub RateTypeID_Exit(Cancel As Integer)
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
End Sub

Thanks,
Bill
 

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

Top