0

Hi:

I am writing code in VB but SQL is the major role here..

I am checking if MFG="DELL" in table1 and if that is there I need a msg box saying "DELL is supported"


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

Dim con As OleDbConnection = New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\bashkark\Desktop\Final Database.mdb")

Dim cmd As New OleDbCommand

cmd = New OleDbCommand (if exists("select * from table1 where MFG='DELL'")

MsgBox("DELL is Supported")

else

i am going to have several such statements.. and if those values exist in my table2, I will have to change the forecolor of values in table1 to green if exists and red if they do not exist. Table1 and table2 have the same fields.

I am trying to do something like this.. But not sure if this is right.. can u please correct me ?

thanks

kukks

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by AntonioGK
0

Hello,

1 - This is a windows form or a web form?
2 - are you using visual studio .net or The express edition?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.