Smith5646 24 Junior Poster in Training

If you can post what has you stuck, either the code that isn’t working or pseudo code if you’re completely stuck with the language, we can help you out. We are here to help and gladly do, but we will not do the work for you.

Smith5646 24 Junior Poster in Training

Maybe you could use an arraylist (drivers in the example below) instead of 6 different variables (d1 - d6). Then you could do something like this.

If player(x).drivers.Contains("VETTEL") Then
  player(x).score += score.vettel
End If
codeorder commented: quite helpful:) +12
Smith5646 24 Junior Poster in Training

As I dig deeper into the capabilities of Visual Studio, I have seen that you can have multiple projects in a single solution. I must be missing something because I can't come up with a reason to ever do this? My guess is that I don't understand the benefit. So, I thought I would pose the question to my fellow developers and ask for some real world situations where you had multiple projects in one solution, the benefit obtained, and at a high level, what each project did and why they needed linked into one solution. Also, were they all exes, dlls, etc.?

Thanks in advance for your input.

codeorder commented: interesting topic :) +1
Smith5646 24 Junior Poster in Training

The below code will trap the event you are after. However, once an item is selected, it can't be deselected without selecting another value. In other words, SelectedIndex will never again = -1. It would seem that you need to set Label26.visible = true during load and then let this function turn it off after the user selects a value.

Private Sub ComboType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboType.SelectedIndexChanged
        If ComboType.SelectedIndex = -1 Then
            Label26.Visible = True
            Label26.ForeColor = Color.Red
            Label26.Text = "(Select the Job Category )"
        Else
            Label26.Visible = False
        End If
    End Sub
b1izzard commented: Good +2
Smith5646 24 Junior Poster in Training

My apologies to adatapost. His/her answer sounded like he/she misunderstood my issue but the answer given was correct.

Here is the reason this happened. Because the child window did not have a font size assigned to the form, it was using the default font in Visual Studio. When it was added to the MDI container, it inherited the container's font which was larger than the child and increased the entire window (labels, textboxes, etc.) accordingly.

Here is the funny part. I originally said it was like it increased the child window by 10%. The child window was font 8.25 and the container was 9.0 which is a 9.09% increase.

Thanks adatpost for your answer and again, my apologies for jumping to the conclusion that you misunderstood my original post.

kvprajapati commented: No problem, glad I could help. +9
Smith5646 24 Junior Poster in Training

Since rd.read() will return a true if the read was successful and false if it was not, try...

If rd.read() Then
    If TextBox8.Text = rd(0) Then
    ...remainder of your code
    End If
Else
    MsgBox("BAD Username")
End If
Smith5646 24 Junior Poster in Training

From the code posted, I think you are trying to update the record you previously read, correct? If so, the syntax you need is something like:

UPDATE MathsTest
SET EasyTime = @EasyTime, EasyDate = @EasyDate
WHERE LoginName = '@Username' AND Password= '@Password'

and don't forget to also pass the Username and Password.

This also assumes there is only one row for the Username / Password. If there are multiple rows (as in multiple tests) then you will probably need to add additional criteria to the where clause to specify which row (test) to update.

There is also a way to specify on the select that it is for update but that is a little beyond my knowledge (and not sure if it works in Access). I always specify the where clause when I do updates just in case I read another record and forgot.