Hi,
I've setup a form with several edit boxes and with a button to add the text in the edit boxes to be saved in a file. I've tryed to put a validation check in the program:

When the user press' the "Save" button, it checks if the edit boxes have text in it, if so it saves it, but if the edit box is blank/empty then it brings up a message box telling the user all fields must be filled in.

Could some please help me out.

Recommended Answers

All 3 Replies

set a flag to be true
use a for next loop to check all editboxes and ensure if something is entered
if a box has nothing in it set the flag to be false
when exit loop, check if flag is true/false, if true save details, if false flash message on screen

Thank you for your help

if need the actual code let me know and i'll try to knock something up

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.