Hi,
I have a combo box called cmbcri1, I also have a button called Submit.
When this button is clicked and cmbcri1 has no selection done then a message box should be sent..
"All fields are mandatory"
any help please
Thanks
Hi,
I have a combo box called cmbcri1, I also have a button called Submit.
When this button is clicked and cmbcri1 has no selection done then a message box should be sent..
"All fields are mandatory"
any help please
Thanks
Code:If Len(Me.cmbcri1& vbNullString) = 0 Then MsgBox "You need to fill out cmbcri1" Exit Sub End If
Ok..
Note: Am working with Access 2003.
So I have a Submit on the form, when clicked it checks if the cmbcri1, cmbcri2 etc have values.
Therefore, On click event of the button I have;
The first line is an error and highlighted in RED-Code:If Len(frmMain.cmbcri1& vbNullString) = 0 Then MsgBox "You need to fill out cmbcri1" Exit Sub End If
If Len(frmMain.cmbcri1& vbNullString) = 0 Then
Note: I changed Me.cmbcri1 to frmMain.cmbcri1.
It gives a compile error at vbNullString
Can I check all the combo boxes within 1 if statement?
Thanks
Sorry, typo on my part. Go back to the Me syntax and add a space before the &.