i have a button name save and a datagrid with 2 columns namely drugname which is a combo box and qtyused(simple) and a txtFirstName on the form

if the user enters firstname and 4got to enters or select the datagrid column
i want to remind him/her by a msgbox that she/he has to select the drug name and specify qtyused

a msgbox for the 2 columns drugname and qtyused

help....

Hi
I am not clearly understand ur problem. but try this.
Use GotFocus () event of DataGrid and Check the Combo Box whether anything selected or not. If not, show the message box.

I think u need validation in save button click event.if datagrid.row.selected=true then
continue
else
msgbox("Please select Drug name")

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.