I have created a form that allows users to select a model number using a dropdown and click a button to open a sub-form. When it opens the sub-form, it passes the record id, in this case a GUID successfully. However, when the user enters a serial number on the sub-form and goes to the next record, it doesn't pass the GUID. I have been able to pass a simple text string (text29 - for testing) but just not the GUID.
My reason for this is to allow users to enter multiple serial numbers assigned to the same model number without entering the model number in every time. I am a newbie to VBA and Access. So, any help is greatly appreciated.
My code:
Main Form:
Private Sub Command24_Click ()
RunCommand acCmdSaveRecord
DoCmd.OpenForm "addMultipleNew Inventory"
Forms!addMultip leNewInventory! partsLookupUUID .Value = Me!Combo9.Value
Forms!addMultip leNewInventory! Text29.Value = Me!serialNumber .Value
DoCmd.Close acForm, "Add New Inventory", acSaveYes
End Sub
Sub-Form:
Private Sub Form_AfterUpdat e()
Me!partsLookupU UID.Value = Me!partsLookupU UID.Value
Me!Text29.Value = Me!Text29.Value
End Sub
My reason for this is to allow users to enter multiple serial numbers assigned to the same model number without entering the model number in every time. I am a newbie to VBA and Access. So, any help is greatly appreciated.
My code:
Main Form:
Private Sub Command24_Click ()
RunCommand acCmdSaveRecord
DoCmd.OpenForm "addMultipleNew Inventory"
Forms!addMultip leNewInventory! partsLookupUUID .Value = Me!Combo9.Value
Forms!addMultip leNewInventory! Text29.Value = Me!serialNumber .Value
DoCmd.Close acForm, "Add New Inventory", acSaveYes
End Sub
Sub-Form:
Private Sub Form_AfterUpdat e()
Me!partsLookupU UID.Value = Me!partsLookupU UID.Value
Me!Text29.Value = Me!Text29.Value
End Sub
Comment