hi.. Im a beginner in visual basic 2010 im making my first project i created form3 for the search function so i created 2 checkbox to give the user the choice to choose to search by name or by date or by both of them and i created a button search then i created a datagridview to show up the results so im confused now how to start my project. should I start it with if checkbox1 checked then.... or what? some guidance will be appreciated.. thanks in advance
Beginner20 0 Newbie Poster
Recommended Answers
Jump to PostThere are a few ways you can do this. One easy way is to add an if..else in the button_click code so that if checkbox1 is checked, then show the results based on name. If checkbox2 is checked, then show results based on date. Either way, I assume that you …
Jump to Postcheckbox1 - name
checkbox2 - dategive conditions in such a way that
if checkbox1.checked = true then 'ur sql query which will show the result in datagridview elseif checkbox2.checked = true then 'ur sql query elseif checkbox1.checked = true and checkbox2.checked = true then 'ur sql …
Jump to PostImports System Imports System.Data Imports System.Configuration Imports System.Collections.Generic Imports System.Windows.Forms Imports System.Drawing Imports System.Drawing.Printing Imports System.Data.SqlClient Imports System.Collections Imports System.Resources Imports System.Data.OleDb Imports System.Windows.Forms.Control Public Class Form1 Inherits System.Windows.Forms.Form Dim connectionString As String Dim connection = New System.Data.OleDb.OleDbConnection() Dim SqlCommand As OleDb.OleDbCommand = New OleDb.OleDbCommand Private Sub …
All 11 Replies
wen_cai -3 Junior Poster in Training
JorgeM 958 Problem Solver Team Colleague Featured Poster
padagalingamg 0 Newbie Poster
Beginner20 0 Newbie Poster
Beginner20 0 Newbie Poster
nubie.net 0 Newbie Poster
poojavb 29 Junior Poster
M.Waqas Aslam commented: very nice one , Pooja , simple and clear. +4
ashley24 0 Newbie Poster
Beginner20 0 Newbie Poster
poojavb 29 Junior Poster
M.Waqas Aslam 67 Posting Pro in Training Featured Poster
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.