Home > Software engineering >  Vb procedure of the algorithm
Vb procedure of the algorithm

Time:09-24

In a recent project, topic is machined products quality traceability system, traces the flow-chart
The flow chart of program,,,

CodePudding user response:

The original poster is when the boss potential,

CodePudding user response:

This does not need what algorithm,
As long as know which library, the relationship between tables and fields, directly keep query well step by step,

CodePudding user response:

Seems I also figured it out,,

CodePudding user response:

My graduation design, it is doing, not the boss

CodePudding user response:

The boss often take money and flow charts for programmers programming,

CodePudding user response:

Zhao four teachers, help me to look at the program, why not k, l the value of the
 If rs1. RecordCount & gt; 0 Then 
The Do While rs1. EOF=False
On the Error Resume Next
If a=rs1. Fields (1) Then
B=rs1. Fields (2)
J=j + 1
End the If
Rs1. MoveNext 'record down
Loop
End the If
If rs6. RecordCount & gt; 0 Then
The Do While rs6. EOF=False
On the Error Resume Next
If b=rs6. Fields (1) Then c=rs6. Fields (2)
Rs6. MoveNext 'record down
Loop
End the If
If rs7. RecordCount & gt; 0 Then
The Do While rs7. EOF=False
On the Error Resume Next
If c=rs7. Fields (7) Then
K=rs7. Fields (8)
L=rs7. Fields (4)
End the If
Rs7. MoveNext 'record down
Loop
End the if

CodePudding user response:

The Do While rs1. EOF=False and rs1. BOF=False
.
First comment out
'On the Error Resume Next
Convenient in the IDE to run the pop-up dialog when something goes wrong, debugging after the cursor automatically locate the wrong statement,
At this point can be used in the immediate window
? The variable name
Show the current auxiliary debugging the value of a variable,

CodePudding user response:

In the Do While rs1. Behind the EOF=False and rs1. BOF=False is ok? Why I tried or not

CodePudding user response:

The general procedure is such, run results as follows, , the value behind the not read to see

 Private Sub Command2_Click () 
A=Text2. Text
J=0

With MS2
. Rows=7
The Cols=3
'column of MS1 table width and header information
S=Array (" 600 ", "1400", "8000")
Y=Array (" serial number ", "database", "query")
For I=0 To 2
ColWidth (I)=(I) 's definition table column width
TextMatrix (0, I)=y (I) 'definition header information
Next I
'the line number of MS1 table
For I=1 To 6
TextMatrix (I, 0) as your table column 0=I 'assignment
Next I
End With
If rs1. RecordCount & gt; 0 Then
The Do While rs1. EOF=False And rs1. BOF=False
On the Error Resume Next
If a=rs1. Fields (1) Then
B=rs1. Fields (2)
J=j + 1
End the If
Rs1. MoveNext 'record down
Loop
End the If
If rs6. RecordCount & gt; 0 Then
The Do While rs6. EOF=False
On the Error Resume Next
If b=rs6. Fields (1) Then c=rs6. Fields (2)
Rs6. MoveNext 'record down
Loop
End the If
If rs7. RecordCount & gt; 0 Then
The Do While rs7. EOF=False
On the Error Resume Next
If c=rs7. Fields (7) Then
K=rs7. Fields (8)
L=rs7. Fields (4)
End the If
Rs7. MoveNext 'record down
Loop
End the If
If rs8. RecordCount & gt; 0 Then
The Do While rs8. EOF=False
On the Error Resume Next
If c=rs8. Fields (7) Then n=rs8. Fields (8) And p=rs8. Fields (4)
Rs8. MoveNext 'record down
Loop
End the If
If rs2. RecordCount & gt; 0 Then
The Do While rs2. EOF=False
On the Error Resume Next
If c=rs2. Fields (7) Then m=rs2 Fields. (4) And q=rs7 Fields. (5) And e=rs2 Fields (8)
Rs2. MoveNext 'record down
Loop
End the If

If rs3. RecordCount & gt; 0 Then
The Do While rs3. EOF=False
On the Error Resume Next
If c=rs3. Fields (7) Then f=rs3. Fields (4) And g=rs3. Fields. (5) And h=rs3 Fields (8)
Rs3. MoveNext 'record down
Loop
End the If

If j=1 Then
MS2. TextMatrix (1, 1)="DGCPHXTDGLSJK
"MS2. TextMatrix (1, 2)="associated box coding for" & amp; B
MS2. TextMatrix (2, 1)="XTHDDGLSJK
"MS2. TextMatrix (2, 2)="crib associated coding for" & amp; C
MS2. TextMatrix (3, 1)="CGSJK
"MS2. TextMatrix (3, 2)="supplier" & amp; L & amp; "Purchase order" & amp; K
MS2. TextMatrix (4, 1)="XSSJK
"MS2. TextMatrix (4, 2)="buy manufacturer for" & amp; P & amp; "Sales orders for" & amp; N
MS2. TextMatrix (5, 1)="CCGLSJK
"MS2. TextMatrix (5, 2)="out of the warehouse to warehouse" & amp; M & amp; , "warehouse to & amp;" Q & amp; ", outbound order for "& amp; E
MS2. TextMatrix (6, 1)="RCGGSJK
"MS2. TextMatrix (6, 2)="source warehouse for" & amp; F & amp; ", a levite warehouse for "& amp; G & amp; ", GRN for "& amp; H
MsgBox "the product for the real thing,", "prompt"
The Else
MS2. TextMatrix (1, 1)="DGCPHXTDGLSJK
"MS2. TextMatrix (1, 2)="the code does not exist or has been removed"
MS2. TextMatrix (2, 1)=""
MS2. TextMatrix (2, 2)=""
MS2. TextMatrix (3, 1)=""
MS2. TextMatrix (3, 2)=""
MS2. TextMatrix (4, 1)=""
MS2. TextMatrix (4, 2)=""
MS2. TextMatrix (5, 1)=""
MS2. TextMatrix (5, 2)=""
MS2. TextMatrix (6, 1)=""
MS2. TextMatrix (6, 2)=""
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related