jhai_salvador 48 Junior Poster

You can use variables to hold each value you need. You can make it something like this...

Dim Var1 as Double
Dim Var2 as Double
Dim SubTotal As Double

Var1 = CDbl(Text1.text) * 0.16
Var2 = 0.16
SubTotal = Var1 + Var2 
'Label1 Shows the value of SubTotal
Label1.Caption = SubTotal

Var2 is the tax code e.g 16%, just like that.. Hope it helps...

jhai_salvador 48 Junior Poster

Use the DateDiff Function to determine the interval between 2 dates or time.

Dim Bday as Date
Dim dVar as string, dAge as string

dAge = DateDiff("yyyy",bDay,Date) 'Shows your Age
dVar = DateDiff("d",bDay,Date)    'Shows # of Days between bDay and the Date

Try it. Hope it works for you.

jhai_salvador 48 Junior Poster

Does your listview property is a is in report view?..
I do my list view this way..

Do While Not rs.EOF
    ListView1.ListItems.Add , , rs!model_name
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , rs!BOXID
    ListView1.ListItems.Item(ListView1.ListItems.Count).ListSubItems.Add , , rs!Description
    rs.MoveNext
Loop

You can do it just like that...

jhai_salvador 48 Junior Poster

One more thing, if you found a solution on how to lock pendrive by serial number, pm me or just post it where you found it. thanks.

jhai_salvador 48 Junior Poster

You need to get serial no of a specific drive right?... Here..
Add this reference "Microsoft Scripting Runtime"
Then, to get Serial No of the drive, add this Function.

Public Function GetDriveSerial(xDrive as string) as string
Dim FSO As New FileSystemObject
If FSO.GetDrive(xDrive).IsReady = True then
   GetDriveSerial = FSO.GetDrive(xDrive).SerialNumber
End if
End Function

xDrive = Drive letter.. ex. "C"
This will return the serial no of xDrive..
Hope this will help you.

jhai_salvador 48 Junior Poster

"LCD.*, LCS.*, LS.*, LMM.*"

try changing the * to the real field name / table name...

jhai_salvador 48 Junior Poster

Please give us more details like where is the line your getting that error..

jhai_salvador 48 Junior Poster

Ok here is an example..

Private Sub ListView1_Click()
Text1.Text = ListView1.SelectedItem.Text
End Sub

This is on ListView1_Click event, this will Display the selected text of listview in the Textbox.

jhai_salvador 48 Junior Poster

See DataFormat of the TextBox in Property Window, maybe there is something useful there..

Goodluck..

jhai_salvador 48 Junior Poster

hello sir thank you i got it.. but i have some problem regarding in my icon..what is the best resolution to use.?...hoping for your positive responds.thank you in advance...

I know you will have this problem (But if you are using .NET version of VB, you will not have this problem)

You must have an icon editing tool, like this one (I use this always to edit my icons)..

http://www.axialis.com

Then. use it to edit your icon with "True Color" Format
(Windows XP icon format) (256 - 32 bit color) (16,8M - 32).

Thats it.

jhai_salvador 48 Junior Poster

hello sir thank you for helping me...more power to you...

Your welcome!.. you can mark this thread now as Solve.

jhai_salvador 48 Junior Poster

hello sir thank you for the reply..i got it sir i also copied my database to the desktop,without this database i can get an error...thank you again sir.
by the way sir how can i change my icon of my exe file?..hoping for your positive responds...

Changing an application can be done by doing this:

if you haven't change the Icon of you FORM then do this

Click your form.
Then look for Icon in Properties window.
Click [...] button and browse your icon file.

Now to change your Exe Icon.

In Menu, Click Project > Project Properties
Click the Make Tab
Just select your Form Icon that you want to use.

I Hope this will help you.
See picture attachment.

jhai_salvador 48 Junior Poster
Copy your exe and Database in one folder
change the database path in your code and use;
App.Path & "\project.mdb"
jhai_salvador 48 Junior Poster
Private Sub btnBill_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBill.Click

        item = txtItem.Text
        duration = txtduration.Text

        Dim fmtstr As String = "{0, -15} {1, 17:c2}"
        '-----------------------------------------------------------------------------------------------
        lstResult2.Items.Add(" Receipt from Eddie's Equipment Rental")
        Select Case item.ToUpper & duration.ToUpper

            Case "1", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 16))
            Case "2", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 12))
            Case "3", "h"
                lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 20))
            Case "1", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Rug cleaner", 24))
            Case "2", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Lawn mower", 18))
            Case "3", "f"
                lstResult2.Items.Add(String.Format(fmtstr, "Paint sprayer", 40))
        End Select
        lstResult2.Items.Add(String.Format(fmtstr, "Deposit", 30))
        lstResult2.Items.Add(String.Format(fmtstr, "Total", 25 + 25))
        '-----------------------------------------------------------------------    End Sub
End Class

Make a breakpoint at:
Select Case item.ToUpper & duration.ToUpper

Add to watch:
item.ToUpper & duration.ToUpper

what is the value of:
item.ToUpper & duration.ToUpper

analyze your select statement again or just use IF ELSE IF Statement...

jhai_salvador 48 Junior Poster

well i think if you are using VB.NET / 2008 you can do this code.. i think... LoL

FormName.ShowDialog()

jhai_salvador 48 Junior Poster

show your form like this example..

Form1.Show vbModal

if you put vbModal when showing a form, this will prevent the user for clicking other form unless the form1 is close...

jhai_salvador 48 Junior Poster

here foreign key mean............? please explain

Table1
iNameID AutoNumber
vName (BTW NAME is a keyword that can cause confusion)
iRoll Number

Table2
iClassID AutoNumber
iNameID Number Foreign Key
vClass (BTW Class VBA Keyword)
dDate (BTW Date KeyWord)

Foreign Key means that it has a relationship with the primary key or the iNameID in Table1 is the same as iNameID in Table2...

( I hope i didnt make a mistake.. :D LOL )

jhai_salvador 48 Junior Poster

You can do this one if you like..
I dunno if the code is correct and this is what you want but you can do this..

Use adodb...

Dim cn as ADODB.Connection
Dim rc as ADODB.Recordset
dim cm as ADODB.Command

then..

cn.open "then your connection string"

and then...

cm.CommandText = "your sql command"
cm.execute

while rc.EOF <> True
Combo1.Add rc!FieldName
rc.MoveNext
wend

jhai_salvador 48 Junior Poster

hmmm... data report with condition?...

try browsing to my site > Downloads > AE4AA Projects > Computer Shop...

www.silentproject.cjb.net

..That project my solve your problem...

..its free.. USE IT FOR YOUR PRIVATE STUDY...

..but any Donation would be apreciate... hehehe..

..HOPE YOU WILL LOOK FOR IT... THANKS..