It would be in the after update event of the combo, in VBA. Here's how to get there:
http://www.baldyweb.com/FirstVBA.htm
It would be in the after update event of the combo, in VBA. Here's how to get there:
http://www.baldyweb.com/FirstVBA.htm
Here are the images of the code and the 'code in action'
Haha... I think I know exactly what went wrong.
I thought that I had to make a combo-field in the table. Just realized I could make a combo-box in a form. I am trying that now.
This attempt did not work either.
Would it work better if I used [Parts per order Auto-Fill Test] instead of [Me]?
Yes, it would be in a form, not the table. "Me" is a shortcut to the full name of whatever object the code is in, so it shouldn't really matter. More here:
Forms Refer to Form and Subform properties and controls
I am at a total loss as to how to resolve this issue. Would it be best if I start from scratch with this database as a reference?
I feel like I have tried everything. It has to be the relationships that are messed up.
Can you email me the sample db, since it won't post here?
Last edited by pbaldy; 08-31-2011 at 02:56 PM. Reason: remove email address to prevent spam
I just sent it to your email. Thank you.
The form you've discussed and pictured is not in the db you sent me.
It is, but it is my fault for not keeping the PartsPerOrder subform that we have been talking about on the database. I just made a quick form from form wizard from the Parts Per Order table.
Ive been using that method for testing purposes. and then deleting the form if it fails.
Also, I apologize for not being here yesterday, I was in class and did not have access to this database.
Now... I'm looking at the Northwind sample database code, and I was wondering how this code worked?
Function Generate(SupplierID As Long, ProductID As Long, Quantity As Long, OrderID As Long, PurchaseOrderID As Long) As Boolean
Dim UnitCost As Long
UnitCost = GetStandardCost(Nz(ProductID, 0))
If Create(SupplierID, GetCurrentUserID(), OrderID, PurchaseOrderID) Then
Generate = CreateLineItem(PurchaseOrderID, ProductID, UnitCost, Quantity)
End If
End Function
and if there was any way that it would be doing what I was looking to do.
Now, just to be clear. If you play with frmBOM, that is the main form I am working on and looking for the improvements for.
I am looking to keep the same general format of the frmBOM, but would like the following to be able to happen in the form.
I would like to be able to select parts with a dropdown menu, by filtering them with a vender ID dropdown first. After choosing the partID, I would like the part's description and unit cost to auto-fill, and be stored in the database.
I guess the question at this point is if that is possible, and if so, where do I start?
Should I continue on with this database?
Should I start from scratch, but use this one as a reference?
Should I make another copy of this database so that I can delete all the relationships and work from there?
Hi,
I am trying to do exactly this, I have managed to use a combo box to autofill another field i.e Description autofills Tariff Code both are fields on a table
Form looks great , however I cant get the resultant info saved to the table
if i put the contol source as Tariff Code , the text box does not populate
my after update says Me.Tariff_Code = Me.Description.Column(1)
Any help appreciated
Mike
Can you post the db?