ChrisPadgham 113 Posting Whiz

I think the object of school assignments is that you do them yourself

ChrisPadgham 113 Posting Whiz

see here Click Here

ChrisPadgham 113 Posting Whiz

I am not sure why you have declared input and i as arrays, this seems wrong. and the * before i in two spots on line 11 should not be there. an int is a primitive of the language and not referenced with a pointer.

ChrisPadgham 113 Posting Whiz

If you don't know how to create a module, I suggest you take a tour of vb first and get an understanding of how VB works prior to commencing such an abitious program.

AndreRet commented: Agreed!! +12
debasisdas commented: agree +13
ChrisPadgham 113 Posting Whiz

You need the nil to indicate the end of the list. Also float is a primitive data type and so wont work in this context. You should use NSNumber (which is an object) rather than float.

ChrisPadgham 113 Posting Whiz

if [Tour Id] a number, if it is you should not have the single quotes in the the expression

strSQL = "Delete From Tour Where [Tour ID] = '" & fgdTour.TextMatrix(fgdTour.Row, 1) & "'"

ie

strSQL = "Delete From Tour Where [Tour ID] = " & fgdTour.TextMatrix(fgdTour.Row, 1) 
ChrisPadgham 113 Posting Whiz

if may work for the first 14 days of the month but if it is currently 20th of June then adding 15 will give you 35th of June which not many people have as a birthday. Try adding 15 to the getdate with the dateadd function before using day function DateADD reference.

You will need to use it for both getdate calls.

adam_k commented: I agree +0
ChrisPadgham 113 Posting Whiz

Nobody has answered because you have not asked a specific technical question. The forum does not supply solutions but if you have written something that does not work someone will help you debug it.

ChrisPadgham 113 Posting Whiz

You are missing an

End If

after line 9

Jx_Man commented: +1 for eagle eyes :D +14
ChrisPadgham 113 Posting Whiz

you could set the visible property of the textbox to False or probably more simply just declare a local variable to hold the string

dim FileToOpen as String
FileToOpen = OpenFileDialog1.FileName
Aleksej commented: You also helped me. Thx +1
ChrisPadgham 113 Posting Whiz

we prefer specific questions here. If you have trouble with some code please post it and we will have a look

ChrisPadgham 113 Posting Whiz

Can I suggest you give it an alias

SELECT CONCAT( Table_Name, '.', Column_Name ) AS TableCol FROM

then use TableCol in your code.

ChrisPadgham 113 Posting Whiz

not to mention that you haven't set the connection string to anything.

ChrisPadgham 113 Posting Whiz

rows 23 - 37 can be replaced with a single SQL statement

cmd.CommandText = "UPDATE booking_details INNER JOIN Table_Details ON booking_details.TableId = Table_Details.TableId SET Table_Details.Reserved = "No" WHERE (((booking_details.ReservationId)=" & Id1 & "));"

not only less code but it will execute much much faster than manually looping through.

ChrisPadgham 113 Posting Whiz

sounds interesting, let us know what you come up with.

AndreRet commented: Well said, lol +13
ChrisPadgham 113 Posting Whiz

if date_received column typed as a Date/Time, then I am not sure whether that is a valid format. There should be a space instead of a . before Value which should be VALUES, also you need to construct the string, you cannot pass in the variables because they are out of scope for the database engine.
the last part of the string, from the first ")" should be something like

) VALUES(" & OrderNumber & ", " & CustomerId & ", #" & DBBDate & "#);"

ChrisPadgham 113 Posting Whiz

you don't need to disable the header. In your code before line two put some code like

if e.RowIndex < 0 then
  msgbox "Please double click on the cell you are interested in"
  exit sub
end if

it is better to provide instructive feedback to your user than simply disable things.

ChrisPadgham 113 Posting Whiz

WIA is your best bet if your scanner drivers support it. Otherwise you will need to use TWAIN. There is a product called EZITWAIN which I have used at a client where WIA did not work.

Begginnerdev commented: Thanks for the input! +4
ChrisPadgham 113 Posting Whiz

you can use an SQL INSERT statement eg

"INSERT INTO mytable (newname, newamount) VALUES('Fred',25);"

ChrisPadgham 113 Posting Whiz

if you want to write for Apple devices you will want to learn Objective-C

mani-hellboy commented: mmm i need more from you +2
ChrisPadgham 113 Posting Whiz

we can't help with more details, can you publish your datamodel

AndreRet commented: Nice said +13
ChrisPadgham 113 Posting Whiz

This forum is not really designed to do your homework for you. Do the design and if you have a particular problem with it someone will help you.

ChrisPadgham 113 Posting Whiz

hmmm not really fully normalised though. How many Min/Max power combinations could you have? not that many I would have thought.

If you are going down this path, why would you not just store the price rather than the Bracket id in the Wiring table. then you would not need to join the other table at all

BitBlt commented: Very true, good point. +8
ChrisPadgham 113 Posting Whiz

Presuming you hold year first enrolled in the Student table you are best to use a calculated field in a view that concatenates these to fields

YearEnrolled & '-' & StudentId AS StudentNo

ChrisPadgham 113 Posting Whiz

if you only want an integer

if isnumeric(txtr.text) then
   if int(txtr.text)=val(txtr.text) then
     OK
   else
     msgbox "Only integers please"
     exit sub
   end if
else
   msgbox "Please enter a number"
   exit sub
end if
faroukmuhammad commented: Useful +3
ChrisPadgham 113 Posting Whiz

SELECT TransInfo.CustNo, Sum(IIf([RPTDate]=" 5/28/2010",[TransYTD]*-1,[TransYTD])) AS CombinedTrans FROM TransInfo GROUP BY TransInfo.CustNo;

BitBlt commented: Clever solution +7
jay.barnes commented: Simple and functional! Who could ask for more? +2
ChrisPadgham 113 Posting Whiz

The former is a better design however Profile should really be Person and you don't need two teacher tables

Person
PersonId (pk)
LastName
FirstName
Tel

Teacher
TeacherId (Pk)
PersonId (Fk)
TeacherQuals

Student
StudentId (Pk)
PersonId (fk)

chandimak commented: Well explained. +0
ChrisPadgham 113 Posting Whiz

If you don't want to reflect the character int the textbox set the KeyCode variable to 0 in the form_keydown event

ChrisPadgham 113 Posting Whiz

Andre provided you with the basic solution, if you are to learn it is necessary for a little bit of thinking and extrapolation by you.

AndreRet commented: Someone that knows what we are all about! +6
ChrisPadgham 113 Posting Whiz

further to earlier comment see attached screen capture for example

AndreRet commented: Nice! +6
ChrisPadgham 113 Posting Whiz

Why don't you write an update SQL to update the table directly rather than bring it into a ds.

eg

UPDATE DurexBOL SET WebSvc=Yes WHERE WebSvc=No

below is the code from the vb help file for executing non-query SQL

Public Sub CreateCommand(ByVal queryString As String, _
  ByVal connectionString As String)
    Using connection As New SqlConnection(connectionString)
        Dim command As New SqlCommand(queryString, connection)
        command.Connection.Open()
        command.ExecuteNonQuery()
    End Using
End Sub
ChrisPadgham 113 Posting Whiz

I am thinking your approach is not completely robust. Without checking I imagine the 123.45 will return true to isnumeric which I imagine you don't want.

Personally, I am not a fan of masked text boxes because they are not that user friendly but it is a quick and easy way to achieve what you want. Use a mask of "0000000A" and set the ASCII only property to true.

If you want to test the 8th character to see if it is a letter here is the code

Dim aChar As String
        aChar = UCase$(Mid$(TextBox3.Text, 8, 1))
        If aChar >= "A" And aChar <= "Z" Then
            Label4.Text = "The 8th char is a letter"
        Else
            Label4.Text = "The 8th char is not a letter"
        End If