autofill in subform

L

Lincoln Beachy

I am making a datebase that is for an private auto Insurance plan. I copy
most of the things over from the sample datebase. In the subform that I have
is the units field will not work good as I want it. When I select a car it
brings the units in then when I select the second car it will be the same
value as the first one is.
Here is the vba code that I have for the afterupdate.
Private Sub ProductID_AfterUpdate()
On Error GoTo Err_ProductID_AfterUpdate

Dim strFilter As String

' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

' Look up product's unit price and assign it to UnitPrice control.
Me.Rate = DLookup("Rate", "Rates", strFilter)

' Look up Vehicle's units and assign it to Units control
Me.Units = DLookup("Units", "Vehicles", strFilter)


Exit_ProductID_AfterUpdate:
Exit Sub
Next question is every year the dates change to that current year. I have
two fields in the Vehicle table. They are To and From. The To is the Ending
Billing date of that vehicle. The From is the Begin Billing Date. How should
I kept an history the these dates. Any one out can up me Please.
Lincoln Beachy
Acess Beginner
Herbalife Dealer
Your Health counts.
 

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