Hello,
Is there a way to require all fields which I've put on a form be required before the user is able to submit (using the enter record button I created)?
Thanks,
Hello,
Is there a way to require all fields which I've put on a form be required before the user is able to submit (using the enter record button I created)?
Thanks,
If IsValidForm() then 'do stuff
Code:public Function IsValidForm() as boolean dim vMsg select case true case txtName = "" vMsg = "Client Name is missing" case isnull(cboState ) vMsg = "State is missing" cboState.setfocus end select if vMsg <>"" then msgbox vmsg,vbCritical,"Required" IsValidForm =vMsg ="" end sub
Or maybe set the fields as required in the table and let Access nag users.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks June7, that' s a simple solution. I'll try playing around the the VBA script as well, thanks for that ranman.
June7, do you know if there's a way to change the error text when I use set required. Meaning it says I must enter a value in MYTABLE.MYFIELD field. Is there a way I can make that user friendly like you must enter a value in the XYZ field?
Thanks,