Update a form field using VBA

Steve@trop

Registered User.
Local time
Today, 13:40
Joined
May 10, 2013
Messages
148
I just figured out how to pass a value from one form to another. Now I need the second form to Update that field so that other code will run the AfterUpdate Sub:

Private Sub cboAssetNumber_AfterUpdate()Me.txtCompressorID.Value = cboAssetNumber.Column(1)Me.txtArea.Value = cboAssetNumber.Column(2)
End Sub

Private Sub Form_Load()
Me.cboAssetNumber = Forms!BarcodeNavigationF!cboAssetNumber
End Sub

I think the command is .update but I'm not sure where it should go or how to use it in this situation.
 
Last edited:
What do you mean by "Update"?
Store or display the data in the combo box?

Dale
 
I'm using the AfterUpdate event to trigger a procedure that populates two other fields on the form based on what is in the combo box. I need to send an update command to set that in motion.
 
I think I've got it figured out. I added the same procedure to the GotFocus event and now I don't need to force an update of the field.
 

Users who are viewing this thread

Back
Top Bottom