School VB small project, need some help with codes.

Soldato
Joined
27 Oct 2005
Posts
13,804
Location
Netherlands
Anyone knows a good database with all vb commands listed, I'd really appriciate one.


Also, how can you make a form close and a form maximize to screen ( commands ) ?

Thanks in advance.

EDIT nvm for the close, found out its Form1.Hide
But still don't know about the maximize to screen option .


EDIT, how stupid of me, I missed the programming section, move this if needed or delete, sorry to post it in GD :( .
 
Last edited:
google it. there is rarely any code needed by things like you are doing that is new. recycle the code :]
 
Form1.hide doesn't close the program- it just hides it.

Code:
For each frm in Forms
unload frm
Next

To maximise, it may be:
Code:
Me.WindowState    = FormWindowState.Maximized
 
Pho said:
Form1.hide doesn't close the program- it just hides it.

Code:
For each frm in Forms
unload frm
Next

To maximise, it may be:
Code:
Me.WindowState    = FormWindowState.Maximized

What's wrong with DoCmd.Close acForm, "frmName" and DoCmd.Maximise? :p

-RaZ
 
ok thanks guys, just 1 more question, I have a bit of a problem, I want all points I've gathered (''punten'' from form 1 and 2 together) to show on the last default form (form2), but it only displays the points gathered on form 2 ( what im trying to do, is start the thing on form 1, do half of it, then goto next form, continue it, and then show the total on the 2nd form of both forms, this is my code so far:

Form 1:

Code:
Private Sub Form_Load()
Dim Punten
Dim Invulcontrolle

Form1.Scale
End Sub

Private Sub Command1_Click()

If Option1.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option2.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option3.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option4.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option5.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option6.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option7.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option8.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option9.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option10.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option11.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option12.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option13.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option14.Value = True Then Invulcontrolle = Invulcontrolle + 1
If Option15.Value = True Then Invulcontrolle = Invulcontrolle + 1

If Option1.Value = True Then Punten = Punten + 10
If Option2.Value = True Then Punten = Punten + 5
If Option4.Value = True Then Punten = Punten + 10
If Option5.Value = True Then Punten = Punten + 5
If Option7.Value = True Then Punten = Punten + 10
If Option8.Value = True Then Punten = Punten + 5
If Option10.Value = True Then Punten = Punten + 10
If Option11.Value = True Then Punten = Punten + 5
If Option13.Value = True Then IPunten = Punten + 10
If Option14.Value = True Then Punten = Punten + 5


If Invulcontrolle = 5 Then
 Form2.Scale
 Form2.Show
 Form1.Hide
Else
 Form1.Hide
 Form3.Show
End If
End Sub

Form 2:

Code:
Private Sub Command1_Click()
If Option1.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option2.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option3.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option4.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option5.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option6.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option7.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option8.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option9.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option10.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option11.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option12.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option13.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option14.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1
If Option15.Value = True Then Invulcontrolle2 = Invulcontrolle2 + 1

If Option1.Value = True Then Punten = Punten + 10
If Option2.Value = True Then Punten = Punten + 5
If Option4.Value = True Then Punten = Punten + 10
If Option5.Value = True Then Punten = Punten + 5
If Option7.Value = True Then Punten = Punten + 10
If Option8.Value = True Then Punten = Punten + 5
If Option10.Value = True Then Punten = Punten + 10
If Option11.Value = True Then Punten = Punten + 5
If Option14.Value = True Then Punten = Punten + 10
If Option15.Value = True Then Punten = Punten + 5

If Invulcontrolle2 = 5 Then
Text1 = Punten
Else
 Form2.Hide
 Form4.Show
End If
End Sub

Private Sub Form_Load()
Dim Invulcontrolle2



End Sub

How can I order the form2 to see the ''punten'' made by form 1?
( forms 3&4 are error messages if you are interested, irrelevant info though :p ...)

(Yes i know this is all uber noob lvl vb, but I am a noob to vb and this is just what my school ordered me to make)
 
Last edited:
Back
Top Bottom