greensleeves149
Member
- Local time
- Today, 11:17
- Joined
- Feb 27, 2022
- Messages
- 49
Hi all.
I've got a form with combo box the main form and also have a subform. The combo box stores a numerical "ID" of the control whilst displays the text value.
I was just wanting a simple messagebox when someone enters data in one of the fields in the subform and the user has forgotten to select something in the combobox on the main form.
I've tried this on the AfterUpdate of one of the controls in the subform:
I get "Compile Error: Type Mismatch" when trying to test the form with the code. I thought "supplierblank" would be "String" and not "Integer" as it's text in the Combo box and not a number that is displayed and tried that too, but that also fails.
Could someone please help me with this?
Thanking you.
I've got a form with combo box the main form and also have a subform. The combo box stores a numerical "ID" of the control whilst displays the text value.
I was just wanting a simple messagebox when someone enters data in one of the fields in the subform and the user has forgotten to select something in the combobox on the main form.
I've tried this on the AfterUpdate of one of the controls in the subform:
Code:
Dim supplierblank As Integer
supplierblank = Forms!frmInvestigation.cboSelectSupplier
If supplierblank Is Null Then
MsgBox "Hey you forgot to add a Supplier!", vbExclamation
End If
I get "Compile Error: Type Mismatch" when trying to test the form with the code. I thought "supplierblank" would be "String" and not "Integer" as it's text in the Combo box and not a number that is displayed and tried that too, but that also fails.
Could someone please help me with this?
Thanking you.