andrewaldrich
Registered User.
- Local time
- Today, 11:39
- Joined
- Jan 15, 2012
- Messages
- 17
After a few days of hitting my against the wall, I could really use some help.
I have a pretty basic DB - 4 tables
Orders
Customers
Order Details
Products
Products are assigned to specific customers.
I have built a form with a subform. The Master Form contains ServiceID and CustomerID and Customer Name.
Linked to the Master is a subform - linked on ServiceID. The subform contains the product details including product id. The product id is in a combo box. When the user chooses a different customer (combo box), the available product id's change in the subform. Its all working splendidly until I read about After Update and VBA code.
I have little to NO experience with VBA code. I have managed to write some pretty hefty DB's without venturing into the unknown. Here's where I am with my code - its full of errors I know ... can someone help me please?
Private Sub PropertyID_AfterUpdate()
Dim productid As Variant
Form.Query1.productid = Null
Form.Query1.productid.Requery
Form.Query1.productid = Form.Query1.productid.ItemData(0)
End Sub
Thanks!
Andy
I have a pretty basic DB - 4 tables
Orders
Customers
Order Details
Products
Products are assigned to specific customers.
I have built a form with a subform. The Master Form contains ServiceID and CustomerID and Customer Name.
Linked to the Master is a subform - linked on ServiceID. The subform contains the product details including product id. The product id is in a combo box. When the user chooses a different customer (combo box), the available product id's change in the subform. Its all working splendidly until I read about After Update and VBA code.
I have little to NO experience with VBA code. I have managed to write some pretty hefty DB's without venturing into the unknown. Here's where I am with my code - its full of errors I know ... can someone help me please?
Private Sub PropertyID_AfterUpdate()
Dim productid As Variant
Form.Query1.productid = Null
Form.Query1.productid.Requery
Form.Query1.productid = Form.Query1.productid.ItemData(0)
End Sub
Thanks!
Andy