Click here to Skip to main content
15,885,278 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to disable Ctrl P keys in vb.net(for my application only) Pin
koolprasad200315-May-07 20:49
professionalkoolprasad200315-May-07 20:49 
AnswerRe: How to disable Ctrl P keys in vb.net(for my application only) Pin
Sonia Gupta15-May-07 21:38
Sonia Gupta15-May-07 21:38 
GeneralRe: How to disable Ctrl P keys in vb.net(for my application only) Pin
koolprasad200315-May-07 23:09
professionalkoolprasad200315-May-07 23:09 
AnswerRe: How to disable Ctrl P keys in vb.net(for my application only) Pin
Xandip16-May-07 0:26
Xandip16-May-07 0:26 
AnswerRe: How to disable Ctrl P keys in vb.net(for my application only) Pin
Dave Kreskowiak16-May-07 3:50
mveDave Kreskowiak16-May-07 3:50 
QuestionError Type Mismach Pin
Vimalsoft(Pty) Ltd15-May-07 20:37
professionalVimalsoft(Pty) Ltd15-May-07 20:37 
QuestionRe: Error Type Mismach Pin
CPallini15-May-07 20:41
mveCPallini15-May-07 20:41 
AnswerRe: Error Type Mismach Pin
Vimalsoft(Pty) Ltd15-May-07 21:07
professionalVimalsoft(Pty) Ltd15-May-07 21:07 
The Extension fiels is
"int" and it allow Null values, infect all the fields i have allow null values, and i have droped a textbox in my form and name it txtextension, i have checked it matched with the one in my code,i have bind it, i can scroll with recordset. but when i try to insert it gives me Problem, as the Filed Extension allows Null values ,If i dot enter anything it supposed to continue. Here is my code for all Buttons
*************************************
This is My Connection
*************************************
Set conn = New Connection
Set rrs = New Recordset
rrs.CursorLocation = adUseServer
rrs.CursorType = adOpenDynamic
rrs.LockType = adLockOptimistic

With conn
.Provider = "SQLOLEDB"
.ConnectionString = "User ID =sde;Password=topology;" & _
"Data Source =SGIICORNETGS01;" & _
"Initial Catalog = Tshwane_Valuations"
.Open
End With

rrs.Open "select * from Property", conn
'Numkey
Set txtnumkey.DataSource = rrs
txtnumkey.DataField = "Num_key"
'Extension
Set txtextension.DataSource = rrs
txtextension.DataField = "Extension"
'Cell ID
Set txtcellid.DataSource = rrs
txtcellid.DataField = "Cell_ID"
'Actula Extent
Set txtactualextent.DataSource = rrs
txtactualextent.DataField = "ACTUAL_EXTENT"
'liskey
Set txtliskey.DataSource = rrs
txtliskey.DataField = "Lis_key"

'set txtfunckey
Set txtfunckey.DataSource = rrs
txtfunckey.DataField = "func_key"

'txtcategory
Set txtcategory.DataSource = rrs
txtcategory.DataField = "PROP_CATEGORY_ID"

'Geocode
Set txtgeocode.DataSource = rrs
txtgeocode.DataField = "GEOCODE"

'Add Date
Set txtadddate.DataSource = rrs
txtadddate.DataField = "ADD_DATE"

'User ID
Set txtadduserid.DataSource = rrs
txtadduserid.DataField = "ADD_USER_ID"

End Sub

********************************************************
Edit /Update
*********************************************************

Private Sub cmdUpdate_Click()
rrs.Update
rrs.MoveNext
If rrs.EOF = True Then
rrs.MoveLast
End If
End Sub
**********************************
and the rest
*********************************

Private Sub cmdAdd_Click()
rrs("Num_key") = txtnumkey
rrs("EXTENSION") = txtextension
rrs("Actual_Extent") = txtactualextent
rrs("Lis_key") = txtliskey
rrs("Func_Key") = txtfunckey
rrs("Prop_Category_ID") = txtcategory
rrs("GEOCODE") = txtgeocode
rrs("Add_Date") = txtadddate
rrs("Add_user_ID") = txtadduserid
rrs.Update
cmdNew.Visible = True
cmdUpdate.Visible = True
cmdRefresh.Visible = True
cmdDelete.Visible = True

End Sub

Private Sub cmdCancel_Click()
rrs.Cancel



End Sub

Private Sub cmdClose_Click()
Dim intresponse As Integer
intresponse = MsgBox("Do you want to Exit", vbYesNo, "Warning")
If intresponse = vbYes Then
Unload Me
ElseIf intresponse = vbNo Then
frmSingle2.Show
End If
End Sub

Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With rrs
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description

End Sub

Private Sub cmdFirst_Click()
rrs.MoveFirst

End Sub

Private Sub cmdLast_Click()
rrs.MoveLast
End Sub

Private Sub cmdNew_Click()
txtnumkey.Text = ""
txtextension.Text = ""
txtextension.Text = ""
txtcellid.Text = ""
txtcellid.Text = ""
txtactualextent.Text = ""
txtactualextent.Text = ""
txtliskey.Text = ""
txtliskey.Text = ""
txtfunckey.Text = ""
txtfunckey.Text = ""
txtcategory.Text = ""
txtgeocode.Text = ""
txtadddate.Text = ""
txtadduserid.Text = ""
cmdNew.Visible = False
cmdUpdate.Visible = False
cmdRefresh.Visible = False
cmdDelete.Visible = False




End Sub

Private Sub cmdNext_Click()

If rrs.EOF = True Then
rrs.MoveLast
Else
rrs.MoveNext
End If
End Sub

Private Sub cmdPrevious_Click()
rrs.MovePrevious
If rrs.BOF = True Then
rrs.MoveFirst
End If
End Sub

Private Sub cmdRefresh_Click()
rrs.Requery

End Sub



Private Sub cmdAdd_Click()
rrs("Num_key") = txtnumkey
rrs("EXTENSION") = txtextension
rrs("Actual_Extent") = txtactualextent
rrs("Lis_key") = txtliskey
rrs("Func_Key") = txtfunckey
rrs("Prop_Category_ID") = txtcategory
rrs("GEOCODE") = txtgeocode
rrs("Add_Date") = txtadddate
rrs("Add_user_ID") = txtadduserid
rrs.Update
cmdNew.Visible = True
cmdUpdate.Visible = True
cmdRefresh.Visible = True
cmdDelete.Visible = True

End Sub

Private Sub cmdCancel_Click()
rrs.Cancel



End Sub

Private Sub cmdClose_Click()
Dim intresponse As Integer
intresponse = MsgBox("Do you want to Exit", vbYesNo, "Warning")
If intresponse = vbYes Then
Unload Me
ElseIf intresponse = vbNo Then
frmSingle2.Show
End If
End Sub

Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With rrs
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description

End Sub

Private Sub cmdFirst_Click()
rrs.MoveFirst

End Sub

Private Sub cmdLast_Click()
rrs.MoveLast
End Sub

Private Sub cmdNew_Click()
txtnumkey.Text = ""
txtextension.Text = ""
txtextension.Text = ""
txtcellid.Text = ""
txtcellid.Text = ""
txtactualextent.Text = ""
txtactualextent.Text = ""
txtliskey.Text = ""
txtliskey.Text = ""
txtfunckey.Text = ""
txtfunckey.Text = ""
txtcategory.Text = ""
txtgeocode.Text = ""
txtadddate.Text = ""
txtadduserid.Text = ""
cmdNew.Visible = False
cmdUpdate.Visible = False
cmdRefresh.Visible = False
cmdDelete.Visible = False




End Sub

Private Sub cmdNext_Click()

If rrs.EOF = True Then
rrs.MoveLast
Else
rrs.MoveNext
End If
End Sub

Private Sub cmdPrevious_Click()
rrs.MovePrevious
If rrs.BOF = True Then
rrs.MoveFirst
End If
End Sub

Private Sub cmdRefresh_Click()
rrs.Requery

End Sub


Please help




Vuyiswa

GeneralRe: Error Type Mismach Pin
ChandraRam15-May-07 21:23
ChandraRam15-May-07 21:23 
GeneralRe: Error Type Mismach Pin
Vimalsoft(Pty) Ltd15-May-07 22:02
professionalVimalsoft(Pty) Ltd15-May-07 22:02 
GeneralRe: Error Type Mismach Pin
Vimalsoft(Pty) Ltd15-May-07 22:42
professionalVimalsoft(Pty) Ltd15-May-07 22:42 
QuestionProblem arise when set exe icon Pin
Rupesh Kumar Swami15-May-07 20:09
Rupesh Kumar Swami15-May-07 20:09 
AnswerRe: Problem arise when set exe icon Pin
Xandip16-May-07 0:11
Xandip16-May-07 0:11 
AnswerRe: Problem arise when set exe icon Pin
Dave Kreskowiak16-May-07 3:37
mveDave Kreskowiak16-May-07 3:37 
Questionhi.... [modified] Pin
navyasri15-May-07 20:08
navyasri15-May-07 20:08 
AnswerRe: hi.... Pin
Christian Graus15-May-07 20:19
protectorChristian Graus15-May-07 20:19 
QuestionSystem.Diagnosis.process Pin
Sonia Gupta15-May-07 19:33
Sonia Gupta15-May-07 19:33 
AnswerRe: System.Diagnosis.process Pin
Vivek Narayanan15-May-07 19:44
Vivek Narayanan15-May-07 19:44 
QuestionRe: System.Diagnosis.process Pin
Sonia Gupta15-May-07 19:59
Sonia Gupta15-May-07 19:59 
AnswerRe: System.Diagnosis.process Pin
Vivek Narayanan16-May-07 1:16
Vivek Narayanan16-May-07 1:16 
GeneralRe: System.Diagnosis.process Pin
Sonia Gupta16-May-07 2:10
Sonia Gupta16-May-07 2:10 
AnswerRe: System.Diagnosis.process Pin
Dave Kreskowiak16-May-07 3:34
mveDave Kreskowiak16-May-07 3:34 
Questionsubclassing only in runmode Pin
lee2315-May-07 19:15
lee2315-May-07 19:15 
QuestionRe: subclassing only in runmode Pin
CPallini15-May-07 20:48
mveCPallini15-May-07 20:48 
AnswerRe: subclassing only in runmode Pin
lee2315-May-07 22:05
lee2315-May-07 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.