hi every 1/ . i am having problem in sql query. if i double click on the dataset. i am not sure which statement to write to restrict the user so that he/she cannot enter the date in the past. i have droped the data set on the form and my data entry is through datagrid view.kindly help.
dilse4sk
0
Junior Poster in Training
Recommended Answers
Jump to Postok lets assume you have a form , have so many controls , and a datetimepicker , now you want to save records of the current date , and restrict user to save records of past date , then you can do like this .
if datetimepicker.value.date.tostring() …
Jump to Postis there any column of date ?
Jump to Postwell bro do this
if datagrid.item(columnindex,rowindex).value.tostring() < now.date.tostring() then msgbox("you are trying to save records of past date.") else 'allow user end if
you are using loop to insert your data ? if you find any prob then please post your insertion code here.
Best Regards
Jump to Posthmmm , well i dont know what you have done so far but here is a sample code , try to make is workable for you ,
consider we have values in grid , we have two columns , userid , date , now do thisdim …
All 13 Replies
dilse4sk
0
Junior Poster in Training
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
dilse4sk
0
Junior Poster in Training
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
dilse4sk
0
Junior Poster in Training
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
dilse4sk
0
Junior Poster in Training
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
Mitja Bonca
557
Nearly a Posting Maven
dilse4sk
0
Junior Poster in Training
dilse4sk
0
Junior Poster in Training
Mitja Bonca
557
Nearly a Posting Maven
dilse4sk
0
Junior Poster in Training
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.