M Costumes
Member
- Local time
- Today, 08:13
- Joined
- Feb 9, 2021
- Messages
- 75
I have a multi-value sub-form based on an Inventory table where the user selects an InvnetoryID from a cbo box and it autopopulates the appropriate fields (setID and RentalRate). It fills SetID just fine, but will not populate RentalRate with the value from the Inventory table. Inventory.RentalRate is set to currency. This is my VBA:
When I test it, I get a run-time error 2448 "can't assign value to this object" When I run debug, it points to the last line. I've tried changing that line to
and it did the same thing.
I'm very new to all of this, and have searched here and other forums/google in general and I've not quite found a solution. Any ideas?
Code:
Private Sub cboInventoryID_AfterUpdate()
Me.txtSetID.Value = Me.cboInventoryID.Column(2)
Me.txtRentalRate.Value = Me.cboInventoryID.Column(3)
End Sub
Code:
Me!txtRentalRate.Value = Val(Me!.cboInventoryID.Column(3))
I'm very new to all of this, and have searched here and other forums/google in general and I've not quite found a solution. Any ideas?