Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

debug window will be useful when u get some error in your program.

Jx_Man 987 Nearly a Senior Poster Featured Poster

sorry i wrong :

Dim x,y as integer
Private Sub Command1_Click()
x = 10
y = 10
Print x + y
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

post your code or using an attachment. please using this forum facility....

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can declare x and j in outside procedure or event but the assignment must be in procedure or event.
ex :

Dim i,j as integer
Private Sub Command1_Click()
i = 10
j = 10
Print x + y
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

maybe your path in code is wrong?
i mean your path not same in other pc or the excel file is not exist in other pc.
do like as shouvik said.

Jx_Man 987 Nearly a Senior Poster Featured Poster

you can do generally searching??
if u can, its a same technique.
put you search procedure in text change event. so when user input data on textbox it will searching others data.
but why u using first name as searching key??
how about if you have 2 same frist name in your database??why you didn't used their id?

Jx_Man 987 Nearly a Senior Poster Featured Poster

ok. happy coding friend :)
dont forget to mark this thread solved :D

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

yeah..You're welcome friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

its ok friend.
are your question already solved?

Jx_Man 987 Nearly a Senior Poster Featured Poster

don't forget to give a feedback :)

Naruse commented: Great Feedback for your code friend.... +1
Neji commented: thx +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome friend.
Happy coding :)

november_pooh commented: thanks again sir +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi T.D...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code :

Private Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA" (ByVal pPrinterName As String, phPrinter As Long, pDefault As Any) As Long
Private Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As Long) As Long
Private Declare Function EnumJobs Lib "winspool.drv" Alias "EnumJobsA" (ByVal hPrinter As Long, ByVal FirstJob As Long, ByVal NoJobs As Long, ByVal Level As Long, pJob As Any, ByVal cdBuf As Long, pcbNeeded As Long, pcReturned As Long) As Long
Private Sub Form_Load()
   
    Dim hPrinter As Long, lNeeded As Long, lReturned As Long
    Dim lJobCount As Long
    OpenPrinter Printer.DeviceName, hPrinter, ByVal 0&
    EnumJobs hPrinter, 0, 99, 1, ByVal 0&, 0, lNeeded, lReturned
    If lNeeded > 0 Then
        ReDim byteJobsBuffer(lNeeded - 1) As Byte
        EnumJobs hPrinter, 0, 99, 1, byteJobsBuffer(0), lNeeded, lNeeded, lReturned
        If lReturned > 0 Then
            lJobCount = lReturned
        Else
            lJobCount = 0
        End If
    Else
        lJobCount = 0
    End If
    ClosePrinter hPrinter
    MsgBox "Jobs in printer queue: " + CStr(lJobCount), vbInformation
End Sub
Sawamura commented: great code and always helping... +1
Estella commented: wow +1
ITKnight commented: :confused: +1
november_pooh commented: yombex +1
Vega_Knight commented: :twisted: +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

try this following code :

Private Const SND_APPLICATION = &H80         '  look for application specific association
Private Const SND_ALIAS = &H10000     '  name is a WIN.INI [sounds] entry
Private Const SND_ALIAS_ID = &H110000    '  name is a WIN.INI [sounds] entry identifier
Private Const SND_ASYNC = &H1         '  play asynchronously
Private Const SND_FILENAME = &H20000     '  name is a file name
Private Const SND_LOOP = &H8         '  loop the sound until next sndPlaySound
Private Const SND_MEMORY = &H4         '  lpszSoundName points to a memory file
Private Const SND_NODEFAULT = &H2         '  silence not default, if sound not found
Private Const SND_NOSTOP = &H10        '  don't stop any currently playing sound
Private Const SND_NOWAIT = &H2000      '  don't wait if the driver is busy
Private Const SND_PURGE = &H40               '  purge non-static events for task
Private Const SND_RESOURCE = &H40004     '  name is a resource name or atom
Private Const SND_SYNC = &H0         '  play synchronously (default)
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long

Private Sub Form_Load()
    PlaySound "C:\WINDOWS\MEDIA\TADA.WAV", ByVal 0&, SND_FILENAME Or SND_ASYNC
   
End Sub
november_pooh commented: Really great code :) +1
ITKnight commented: hard to see +1
Jade_me commented: Good +1
Estella commented: Running Good +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

what version of vb that u using??
i guest you use vb6. if this right you post thread on wrong section, this section for vb.net you can post thread on vb 6 section but i still answer this thread...

first you must change button style on button properties from Standard to Graphical.
Style = Graphical
after that you can change back color of command button.
use this code to change color at runtime.

Command1.BackColor = vbBlue
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

there are some error display when you execute that exe file??

Jx_Man 987 Nearly a Senior Poster Featured Poster

please don't hijack other thread. make your own thread, so others people can read and giving some help. ok friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

on what database?

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Tring...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Sandip...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Toni Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

as ramy said, attach your current mdf file then you can do anything.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

post on current section vb6

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Jeremy...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

HI...Welcome to Daniweb Friend :)
thanks for what??

Jx_Man 987 Nearly a Senior Poster Featured Poster

did you means when you press show then datagrid appear and when you press hide then datagrid disappear??
if i m not wrong try to using datagrid.visible = false to hide and datagrid.visible = true to show.

Jx_Man 987 Nearly a Senior Poster Featured Poster

this for add item from selected item on combo box to listbox :

Private Sub Combo1_Click()
List1.AddItem (Combo1.Text)
End Sub

to add item from textbox to listbox you need button to execute all letters on textbox to listbox cause if u direct to add from textbox it will add one by one word in textbox.
or you can manage all input from textbox and combo box with one button :

Private Sub Command1_Click()
List1.AddItem (Combo1.Text)
List1.AddItem (Text1.Text)
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

what do you want to do?

Jx_Man 987 Nearly a Senior Poster Featured Poster

HI..Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Jim...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Welcome back to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome friend...
Happy coding :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

spoon

Jx_Man 987 Nearly a Senior Poster Featured Poster

Yes

Do you cooking as hobbies?

Jx_Man 987 Nearly a Senior Poster Featured Poster

156 = 10011100

Jx_Man 987 Nearly a Senior Poster Featured Poster

rare to take a bath :D

Jx_Man 987 Nearly a Senior Poster Featured Poster

455:)

Jx_Man 987 Nearly a Senior Poster Featured Poster

bale

Jx_Man 987 Nearly a Senior Poster Featured Poster

-935

Jx_Man 987 Nearly a Senior Poster Featured Poster

hire

Jx_Man 987 Nearly a Senior Poster Featured Poster

just 3 candies...
i m not familiar with them...

Jx_Man 987 Nearly a Senior Poster Featured Poster

I am 22% Metal Head. lol

Jx_Man 987 Nearly a Senior Poster Featured Poster

Escudo 2.0
Honda Jazz