Begginnerdev 256 Junior Poster

Kind of simplistic, but you can try something like this;

Private Function WeekOfYear(ByVal dt As Date) As Integer
    Try
        Return dt.DayOfYear / 7
    Catch ex As Exception
        MsgBox("There was a problem retreiving the week of the year!" & vbCrLf & ex.Message)
        Return Nothing
    End Try
End Function
Begginnerdev 256 Junior Poster

You are not asking for vb.net related material, just Access help?

If so, I can flag your post to get a mod to transfer it to the correct forum.

Or perhaps I am misunderstanding...

From my experience, it's easier to define a field for a string that contains the path to the file.

This will keep the database from having to pour over Blobs to retreive data.

This can be done by simply performing an insert.

"INSERT INTO table(column1,column2,column3) VALUES ('name','address','C:/Users/paoi00/myPic.jpg')" 'Of course you will change the path to the true path.

What language library are you using?

Jet, OleDB...?

Begginnerdev 256 Junior Poster

Here is Microsoft's Article on how to do so.

Begginnerdev 256 Junior Poster

There are two ways of doing this.

You can save a path to the image

OR

You can save the image into the database (As a blob)

Begginnerdev 256 Junior Poster

In the (form I am asuming) class that the listview belongs in.

Example:

Public Class Form1
    Private lviCurrent As New ListViewItem

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles Me.Load

    End Sub
End Class
Begginnerdev 256 Junior Poster

Do you have a strongly typed dataset behind?

If so, you can just do the following:

DataSet1.DataTable.Rows.AddRow(values)
Begginnerdev 256 Junior Poster

You will want to match things up.

Declare a class wide variable to reference the clicked item.

Example:

Private lviCurrent As New ListViewItem

Next you will want to set the item to the selected item (in the listview's click event)

If IsNothing(ListView1.SelectedItems) = false Then
    For each lvi As ListViewItem in ListView1.SelectedItems
        lviCurrent = lvi
    Next
End If

Now, to pull the values into the text box, do the following:

With lviCurrent
    txtName.Text = .Text 'This will be the first column
    txtAge.Text = .SubItems(0).Text 'This will be the second column
    txtPosition.Text = .SubItems(1).Text 'This will be the third column
End With
Begginnerdev 256 Junior Poster

Not quite sure what you expect from those functions, but both of them just return the max number.

Loopincrement100 will return 100
Loopincrement20 will return 20

Why use the functions to begin with?

If you are trying increment the string (which I think is what you are doing) you will want to do this:

Private Function CreateCourseArray(ByVal sCourse As String)
    Try
        Dim lstCourse As New List(Of String)

        If sCourse = "Maths" Then
            For i = 0 To 100
                lstCourse.Add(sCourse & "/" & i)
            Next

            return lstCourse
        Else
            For i = 0 to 20
                lstCourse.Add(sCourse & "/" & i)
            Next

            return lstCourse
        End If
    Catch ex As Exception
        MsgBox("There was a problem creating the array!" & vbcrlf & ex.message)
        Return Nothing
    End Try
End Function

This will return a list of string that contain:

For Mathematics:

  • Maths/0
  • Maths/1
  • Maths/2
  • ...
  • Maths/100

For English:

  • Eng/0
  • Eng/1
  • Eng/2
  • ...
  • Eng/20
Begginnerdev 256 Junior Poster

My SQL is not the best, but you can do a select/insert like the following:

"INSERT INTO table2 (BOQSectionsAndParts_ID, BOQSection)
 SELECT BOQSectionsAndParts_ID, BOQSection
 FROM db.table1
 WHERE BOQSectionsAndParts_ID='" & ComboBox1.text & "'"
Begginnerdev 256 Junior Poster

Timers do not work in seconds, they work in milliseconds.

Just set the timer to 1000 and the frame will be displayed for a full second

Begginnerdev 256 Junior Poster

You will (as always) have to design/chart your application before you start programming.

Design the tables

You will have to figure out what kinds of information you will need to store (if you were a hotel operator)

You will have to figure out which database better fits the application. (SQL,MySQL,Oracle,Access ect..)

You will have to start defining the tables (I type mine in word or excel to get an idea)

Start laying down the needed relationships (FK ect...)

Flowchart the app

Logically think about what would have to be done, what decisions will have to be made.

Chart the application out, then proof read it.

Design the GUI

Lay down a design for the GUI. (Design it for an end user, not yourself)

You can even doodle down on paper what your ideas would look like.

Start the fun!

Begginnerdev 256 Junior Poster

Might sound stupid

Have you checked to ensure you have connected the 24 pin to the mothoboard and the 8 pin?

Some times people will forget to connect the other and it will not boot.

Also, you are running some decent specs. What's the rating on your power supply?

550 watts should suffice with one card.

If you have two, I would say spring for a 750 or higher.

Begginnerdev 256 Junior Poster

What does the data that is stored in the cell look like?

Is it a long date?

A short date?

A time span?

We can't help unless you show what the data is.

Begginnerdev 256 Junior Poster

Set the format to long time.

Example:

Dim dat As New Date
dat = #10/2/2012 4:04:45 AM#
MsgBox(dat.ToLongTimeString)
Begginnerdev 256 Junior Poster

If the data is in a database, just execute the statement on every record.

Something to the tone of:

"UPDATE table SET column='OUT'"
Begginnerdev 256 Junior Poster

These methods are the easiest.

The alternate way would be to capture each character inserted into the textbox, check it, then submit it.

You would have to set the size limit of the textbox also.

Begginnerdev 256 Junior Poster

Ok. Let's recap.

You have a report generated from a select statement.

You want this report to retreive only the data selected from the listview.

Does the listview contain data that has been inserted into the database, or is it just values the user inserted into it? (without committing to the database)

Begginnerdev 256 Junior Poster

Dr. Watson is a debugger.

Sounds to me like the game (or you) may be having memory problems.

(Memory leaks are common)

I would run a memory diagnostic on both your RAM and your vRAM.

Memory

Video Memory

Begginnerdev 256 Junior Poster

Though a little high in cholesterol, shrimp are a great source of protein with low calories.

Grilled/Steamed shrimp (3oz) can net about 85 calories with 18g of protein, but with 120mg of cholesterol.

Begginnerdev 256 Junior Poster

Sounds like homework...

If you could post your idea/code so far...we may be able to help.

Begginnerdev 256 Junior Poster

Alternately, if you are using WPF - You can download a toolkit that will allow you to create one using XAML.

The article for declaring it can be found here.

Begginnerdev 256 Junior Poster

Have you check the memory?

I have had memory to go bad, and the PC just not boot because of it.

I am assuming you dont get the POST sound?

I would take one out at a time, switch them to see if one module is bad.

Begginnerdev 256 Junior Poster

Here is a good starting point.

This was pulled directly from that page:

Private Sub BookmarkFont()

Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
    Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.Text = "This is sample bookmark text."
Bookmark1.Words(3).Font.Color = Word.WdColor.wdColorBlue

End Sub
Begginnerdev 256 Junior Poster

Set the form's opacity color / percentage

Create a label

Set the back color to the opacity color

Write the text in the label

Set the label location to cursor location

Begginnerdev 256 Junior Poster

If you are deleting the row from the gridview/listview AND the database...just refresh the data.

If not, you can try something like the following:

Private iRecord As Integer 'Set this to the datatype of your unique value

Public Property RowToDelete As Integer 'Set this to the datatype of your unique value
    Get
        return Me.iRecord
    End Get
    Set(value as Integer)
        Me.iRecord = value
    End Set
End Property

Now, when you delete the row from a - pass the unique to b - deleting it there as well.

If both are filled with the same exact data in the same order, you can simply use the row number

Begginnerdev 256 Junior Poster

Have you verified that your split statements are returning the amount you think they are?

Place a break point in the application after the split.

Then use intellisence to view the data inside the object.

Begginnerdev 256 Junior Poster

Is the database storing a path to the original file, or a blob?

If it is a path, just create a local copy of the pdf that gets deleted once the user closes the application

Begginnerdev 256 Junior Poster

No problem my friend. Just be sure to marked the thread as solved.

Thank you for chosing Daniweb. :)

Begginnerdev 256 Junior Poster

Have you stepped through the code to make sure it is executing the query?

You can also try to create a new instance of cmd every command (what I use)

   cmd = New System.Data.OleDb.OleDbCommand("INSERT INTO [GrindItems] ( EMPLOYEE, CHECK, ITEM, PARENT, CATEGORY ) " & _
                                                " VALUES(" & _
                                                ds.Tables(0).Rows(iX).Item(1) & "," & _
                                                ds.Tables(0).Rows(iX).Item(2) & "," & _
                                                ds.Tables(0).Rows(iX).Item(3) & "," & _
                                                ds.Tables(0).Rows(iX).Item(4) & "," & _
                                                ds.Tables(0).Rows(iX).Item(5) & ")",yourConnection)
Begginnerdev 256 Junior Poster

Duplicate thread here

Begginnerdev 256 Junior Poster

Handle the listview's Click event

Example:

    Private Sub ListView1_Click(sender As System.Object, e As System.EventArgs) Handles ListView1.Click
    'Refernces the selected record
    Try
        If IsNothing(ListView1.SelectedItems) = False Then
            For Each sItem As ListViewItem In ListView1.SelectedItems
                If sItem.Subitem(3).Text.ToLower() = "fail" Then
                    MsgBox("Failing grade!")
                End If
            Next
        End If
    Catch ex As Exception
        MsgBox("There was a problem referencing the entry!" & vbCrLf & ex.Message)
    End Try
End Sub
Begginnerdev 256 Junior Poster

Also, what might be a problem - When inserting strings, you will have to wrap the value in ''

Example:

cmd.CommandText = "INSERT INTO [GringItems] (EMPLOYEE,CHECK,ITEM,PARENT,CATEGORY)" & _
                        " VALUES ('" & _
                        ds.Tables(0).Rows(iX).Item(1) & "'," & _
                       'ect...

You will only need to wrap the values that are represented as string

Begginnerdev 256 Junior Poster

Isn't maya an application that is pay to use.

Reverse engineering would be a punishable offence.

Or am I severly misunderstanding?

Begginnerdev 256 Junior Poster

Have you tried to cast it to the data type of Date?

Begginnerdev 256 Junior Poster

If the declaration is in anything private than it is in accessable.

Can you post the bit of code for the declaration?

Begginnerdev 256 Junior Poster

Here is another post on Microsoft's forumns about the very same thing.

Hope it helps!

Begginnerdev 256 Junior Poster

It may seem like alot of work, but this will pay off in the long run.

When working with databases, I always try to create strongly typed classes.

(Check the file attached for an example)

So you can do the following to retreive a list:

Dim hHotel as New Hotel
Dim lstHotel as New List(Of Hotel)

lstHotel = hHotel.SelectAll()

For i = 0 To lstHotel.Count - 1
    cmb_hotel.Items.Add(lstHotel(i).Hotel)
Next

Once you tackle classing the objects, the rest is SUPER easy.

Begginnerdev 256 Junior Poster

If you have a unique value in the selected listviewitem (I normally make it the first value) you can do this:

"SELECT * FROM table WHERE column='" & listview1.SelctedItems(0).Text & "'"
'This is assuming that the first column contains the unique value.

'If not, you will have to reference the location (0th based) like so
"SELECT * FROM table WHERE column='" & listview1.SelectedItems(0).Subitem(1).Text & "'"
'This will reference the second column, just set the Subitem index to n-1 of the column
Begginnerdev 256 Junior Poster

Did purchase a finger print scanner?

Most fingerprint scanner manufacturers have SDK's that are either free (with registration) or for purchase.

Begginnerdev 256 Junior Poster

Post the part of your code you are using the generate the reports

We can't help if we can't see the code. =)

Begginnerdev 256 Junior Poster

If the user has entered text into a text box, you can just simply use the TextBox.Text method.

A password character is just a way to hide the displayed text, the true text typed is still stored in the textbox's text string variable.

Begginnerdev 256 Junior Poster

The best solution would be to check for a forum for the addin.

Something the developer uses for a "tech support" web site.

As for vb.net, you may have problems going from LTR languages to RTL languages and visa versa.

Begginnerdev 256 Junior Poster

Does your report cycle through the listview's items?

If so, just execute the report on the listview's selcted items.

Example:

For Each itm as ListViewItem in ListView1.SelectedItems
    'Do Work
Next
Begginnerdev 256 Junior Poster

Are you storing the course numbers in a data base, or in the second combo box?

Begginnerdev 256 Junior Poster

Are you using data encapsulation or just sending to Module1's public variable?

(Encapsulation would be using public Properties)

Example:

'Declare local variable
Private iBill as Integer


Public Property CurrentBill as Integer
    Get
        Return me.iBill
    End Get
    Set (value as Integer)
        Me.iBill = Value
    End Set
End Property

-Or-

You can try the following:

Dim bill As Integer = TryCast(textbox14.text,Integer)
If IsNothing(bill) = False Then
    Module1.billno = bill
Else
    MsgBox("Cast not successful")
End If
Begginnerdev 256 Junior Poster

Is this what you are looking for?

Begginnerdev 256 Junior Poster

You can use this project for an idea on how to code with code 39. (code 3 of 9)

Begginnerdev 256 Junior Poster

You might want to research using C# for game design.

Will allow for a little better memory management than vb.net offers.

Here is a basic winforms game.

Hope it helps

Begginnerdev 256 Junior Poster

When you say items, what exactly are you referring to?

Are you painting multiple pictures, shapes, controls, or just a pallete of color?

Begginnerdev 256 Junior Poster

You will have to make use of the textChanged event.

You will need to keep track of the key pressed also.

Create an array filled with all of the characters/keys you want to filter, then check against it with the key pressed.

If it passes,add it to the text box.