Click here to Skip to main content
15,893,564 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 0:50
protectorChristian Graus12-Apr-08 0:50 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 0:52
Member 444291612-Apr-08 0:52 
GeneralRe: now update query problem..hep [modified] Pin
Member 444291612-Apr-08 1:46
Member 444291612-Apr-08 1:46 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 14:16
protectorChristian Graus12-Apr-08 14:16 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 15:14
Member 444291612-Apr-08 15:14 
GeneralRe: now update query problem..hep Pin
Christian Graus12-Apr-08 15:54
protectorChristian Graus12-Apr-08 15:54 
GeneralRe: now update query problem..hep Pin
Member 444291612-Apr-08 15:58
Member 444291612-Apr-08 15:58 
Questionaddnew in array database [modified] Pin
inderabangsawan11-Apr-08 22:05
inderabangsawan11-Apr-08 22:05 
hi, i try to make the database to be updated with .addnew,.update function in the array below. but there was an error.as the below coding, i haven't make any changes to makesure the database be updated as the new data entered.help me. Cry | :(( . for information. this is about interconnected within two forms, that is main form, and addnew projects form.

'this is a part of the main form to display the projects

Public Sub Display_The_Projects()
Dim intCounter As Integer
Dim intCounter_2 As Integer
Dim intCounter_Outside As Integer
Dim Date_In As Date
Static blnNot_First_Time As Boolean
'blnNot_First_Time = False
' Initial Array Assignments

If blnNot_First_Time = False Then
datTo_Do.Recordset.MoveFirst

intCounter = 1
intCounter_2 = datTo_Do.Recordset!Tab_Number
Do Until datTo_Do.Recordset.EOF
If intCounter_2 <> datTo_Do.Recordset!Tab_Number Then
intCounter = 1
intCounter_2 = datTo_Do.Recordset!Tab_Number
End If
gstrTo_Do_Array(datTo_Do.Recordset!Tab_Number + 1, intCounter, 1) =
datTo_Do.Recordset!comment
If datTo_Do.Recordset!Code = "A" Then
gstrTo_Do_Array(datTo_Do.Recordset!Tab_Number + 1, intCounter, 2) = "Active"
ElseIf datTo_Do.Recordset!Code = "R" Then
gstrTo_Do_Array(datTo_Do.Recordset!Tab_Number + 1, intCounter, 2) = "Reactive"
End If
gdtmTo_Do_Dates(datTo_Do.Recordset!Tab_Number + 1, intCounter, 1) =
datTo_Do.Recordset!Date_Entered
gdtmTo_Do_Dates(datTo_Do.Recordset!Tab_Number + 1, intCounter, 2) =
datTo_Do.Recordset!Date_Due
intCounter = intCounter + 1
datTo_Do.Recordset.MoveNext
blnNot_First_Time = True
Loop
End If

Date_In = #9/23/1999#
For intCounter_Outside = 1 To 6
picTo_Do(intCounter_Outside).Cls ' Clear the picture box
For intCounter = 1 To 12 ' Set the color and print the project
If gstrTo_Do_Array(intCounter_Outside, intCounter, 1) > "" Then
If gdtmTo_Do_Dates(intCounter_Outside, intCounter, 2) < Date_In Then
picTo_Do(intCounter_Outside).ForeColor = vbRed
ElseIf gstrTo_Do_Array(intCounter_Outside, intCounter, 2) = "Active" Then
picTo_Do(intCounter_Outside).ForeColor = vbBlack
Else
picTo_Do(intCounter_Outside).ForeColor = vbMagenta
End If

' Position the cursor then Print the project

picTo_Do(intCounter_Outside).CurrentX = 50
picTo_Do(intCounter_Outside).CurrentY = (intCounter - 1) * 300 + 40
picTo_Do(intCounter_Outside).Print gstrTo_Do_Array(intCounter_Outside, intCounter, 1)
End If
Next intCounter
Next intCounter_Outside
End Sub




'this the the addnew project form

Private Sub cmdCancel_button_Click()
Unload frmAdd_To_Do
End Sub

Private Sub cmdOk_Button_Click()
Dim intCounter As Integer
Dim intPriority As Integer

' Determine the Priority

For intCounter = 1 To 5
If optTo_Do_Priorities(intCounter).Value = True Then
intPriority = intCounter
End If
Next intCounter

' Find the first empty spot in the array

intCounter = 1
Do While gstrTo_Do_Array(intPriority, intCounter, 1) <> "" And intCounter < 12
intCounter = intCounter + 1
Loop

' Put data in the array

gstrTo_Do_Array(intPriority, intCounter, 1) = txtTo_Do_Description
gstrTo_Do_Array(intPriority, intCounter, 2) = "Active"
gdtmTo_Do_Dates(intPriority, intCounter, 1) = Date
gdtmTo_Do_Dates(intPriority, intCounter, 2) = txtDue_Date

Unload frmAdd_To_Do
End Sub


*the problem is im in problem to make it as .addnew, .update, to make sure any added projects is updated in database.plz give me some idea.

modified on Saturday, April 12, 2008 4:12 AM

GeneralRe: addnew in array database Pin
Christian Graus11-Apr-08 22:30
protectorChristian Graus11-Apr-08 22:30 
QuestionRe: addnew in array database [modified] Pin
inderabangsawan12-Apr-08 4:02
inderabangsawan12-Apr-08 4:02 
GeneralRe: addnew in array database Pin
Dave Kreskowiak14-Apr-08 2:59
mveDave Kreskowiak14-Apr-08 2:59 
Questionhow i can close all opened forms in my application when user want to logout and switch to new login? Pin
r_mohd11-Apr-08 19:31
r_mohd11-Apr-08 19:31 
GeneralRe: how i can close all opened forms in my application when user want to logout and switch to new login? Pin
Dave Kreskowiak12-Apr-08 3:49
mveDave Kreskowiak12-Apr-08 3:49 
Questionregarding accessing Ms-access Database in vb.net Pin
vijaylumar11-Apr-08 19:15
vijaylumar11-Apr-08 19:15 
GeneralRe: regarding accessing Ms-access Database in vb.net Pin
en.Mahdi11-Apr-08 20:10
en.Mahdi11-Apr-08 20:10 
GeneralRe: regarding accessing Ms-access Database in vb.net Pin
Dave Kreskowiak12-Apr-08 3:45
mveDave Kreskowiak12-Apr-08 3:45 
GeneralRe: regarding accessing Ms-access Database in vb.net Pin
vijaylumar13-Apr-08 19:43
vijaylumar13-Apr-08 19:43 
Questionabout execution of project Pin
vijaylumar11-Apr-08 19:07
vijaylumar11-Apr-08 19:07 
GeneralRe: about execution of project Pin
Christian Graus11-Apr-08 22:32
protectorChristian Graus11-Apr-08 22:32 
Generalsetting the crystal print preview as landscape Pin
en.Mahdi11-Apr-08 19:00
en.Mahdi11-Apr-08 19:00 
GeneralCOM port programming [modified] Pin
ASPnoob11-Apr-08 17:38
ASPnoob11-Apr-08 17:38 
GeneralRe: COM port programming Pin
Dave Kreskowiak11-Apr-08 18:23
mveDave Kreskowiak11-Apr-08 18:23 
GeneralRe: COM port programming Pin
ASPnoob11-Apr-08 19:18
ASPnoob11-Apr-08 19:18 
GeneralRe: COM port programming Pin
Dave Kreskowiak12-Apr-08 3:35
mveDave Kreskowiak12-Apr-08 3:35 
GeneralRe: COM port programming Pin
Marc Soleda12-Apr-08 6:04
Marc Soleda12-Apr-08 6:04 

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.