Home > Software engineering >  Vb master come in, please!
Vb master come in, please!

Time:10-23

See such a vb program on the Internet, as shown in figure interface,
The source code is as follows:
 Private Sub Command1_Click () 
Randomize 'guarantee each run different sequence of random Numbers are produced when
Adodc1. You. MoveFirst
Adodc1. You. MoveInt (Rnd * Adodc1. You. RecordCount + 0)
EOF Then End If Adodc1. You.
Text1. Text=Adodc1. You (the "student id")
Text2. Text=Adodc1. You (" name ")
Text3. Text=Adodc1. You (" number of named ") + 1
Adodc1. You (named "times")=Adodc1. You (" number of named ") + 1 'number in the table named after the accumulative
End Sub

Private Sub Command2_Click ()
Adodc1. You. AddNew
If Text1. Text & lt;> "" Then
Adodc1. You (" student id ")=Text1. Text
The Else
Adodc1. You (" student id ")="unnamed"
End the If
If Text2. Text & lt;> "" Then
Adodc1. You (" name ")=Text2. Text
The Else
Adodc1. You (" name ")="unnamed"
End the If
Adodc1. You (" number of named ")=0
Adodc1. You. Update
End Sub

Private Sub Command3_Click ()
Text1. Text=""
Text2. Text=""
Text3. Text=""
End Sub


Private Sub exit_Click ()
Ask=MsgBox (" confirm exit "& amp; "?" , vbYesNo)
If ask=6 Then End
End Sub

Private Sub new_Click ()
Text1. SetFocus
End Sub

Private Sub search_Click ()
Text1. Text=Adodc1. You (the "student id")
Text2. Text=Adodc1. You (" name ")
Text3. Text=Adodc1. You (the "number of named")
End Sub

Private Sub select_Click ()
Ask=MsgBox (" confirm delete student id as "& amp; Adodc1. You (" student id ") & amp;" The name "& amp; Adodc1. You (" name ") & amp; "?" , vbYesNo)
If ask=6 Then 'chose is button
Adodc1. You. Delete
Adodc1. You. MoveNext 'mobile record refresh screen
End the If
EOF Then If Adodc1. You.
Adodc1. You. MoveLast
End sub


May I ask which controls interface should be set and the need to set up controls which attributes, in order to allow successful, and source whether there is a missing part?
Figure is how does not

CodePudding user response:

CodePudding user response:

Data source, is the most critical is what ADO1 controls set up the connection of database,

CodePudding user response:

Such a simple question

I am not the master, to help you top stick calculate...

CodePudding user response:

The database application.

I am not a master, DingTie calculate for you.

CodePudding user response:

You can't write programs, but please don't get so weak-minded interface,

CodePudding user response:

A bad won't pick up your own program and who are willing to help you, if you even showed a little treasure and care for his application, also won't deliberately to get it and brain damage, I'm afraid but a fool in the world, no one is willing to help the fool,

CodePudding user response:

Adodc1. You. MoveInt (Rnd * Adodc1. You. RecordCount + 0)
Have such a function? The.net?

CodePudding user response:

Adodc1. You. Move the Int (Rnd * Adodc1. You. RecordCount + 0)

CodePudding user response:

ADODC1 control object interface is needed in the Settings to connect to the database and the query parameter, of course, must have the necessary Access database,

CodePudding user response:

Feel the building Lord like open VB classes in the university, want to hand in the curriculum design of the oh
  • Related