i need help on this one please.

M

Mike

Hi Guys,

Things has gotten a little more complacated for me. here
it goes:

I have this form, frmReceiveables bounded to
tblReceivable, it contains:

PartNumber, ProductName, ProductDescription, JobNumber
(this comes from a dropdown menue based ona query, based
on my Jobs tables, all the items received are charged to
one job number which is the one for the shop), UnitsIn
(unit of particular item), UnitPrice, Note.

I have made another table, tblInventory and a form
bounded to this form, I want to be able to either type
the part number or choose it from a dropdown menu and the
other feilds as above to be pupolated to avoide
repeatation. Once these items filled in based on the
frmReceivable above , then I go and calculate the total
amount that received items cost. How do I do this auto
pupolation of the feilds on the frmInventory?


thank you in advance for your help.

Mike.
 
M

Mike

I couldn't find it or maybe I didn't regognozed it.

I have used the codes below but I'm getting this run-time
error mrssage saying I hva ecanceled previous operation.
Private Sub ProductID_Exit(Cancel As Integer)
' Dim varProductName, varProductDescription As Variant
Dim varProductName, varProductDescription, Supplier,
UnitsIn, DateReceived, UnitPrice As Variant
varProductName = DLookup
("ProductName", "tblProductsIn", "ProductID =
[ProductID] ")
varProductDescription = DLookup
("ProducDescription", "tblProductsIn", "ProductID =
[ProductID] ")
varSupplier = DLookup
("Supplier", "tblProductsIn", "ProductID = [ProductID] ")
varUnitsIn = DLookup
("UnitsIn", "tblProductsIn", "ProductID = [ProductID] ")
varDateReceived = DLookup
("DateReceived", "tblProductsIn", "ProductID =
[ProductID] ")
varUnitPrice = DLookup
("UnitPrice", "tblProductsIn", "ProductID = [ProductID] ")

If (Not IsNull(varProductName)) Then Me![ProductName]
= varProductName
If (Not IsNull(varProductDescription)) Then Me!
[ProductDescription] = varProductDescription
If (Not IsNull(varSupplier)) Then Me![Supplier] =
varSupplier
If (Not IsNull(varUnitsIn)) Then Me![UnitsIn] =
varUnitsIn
If (Not IsNull(varDateReceived)) Then Me!
[DateReceived] = varDateReceived
If (Not IsNull(varUnitPrice)) Then Me![UnitPrice] =
varUnitPrice

End Sub

Please let me know of your thoughts on this.

Mike
 

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