Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.
All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!
otor., wala ka yatang code para sa delete.... bigyan mo naman ako ng maikli lang .. ung selected ang madidilit..
saan ba otor sa components un., ung MSHflexgrid
otor.. pahelp po, pano ko iviview sa listview ung mga files ng given folder, all filename po sa given path na folder..
thanks otor., ano ung directorylistbox o filelistbox
otor my lalam ka ba na easiest way para iopen ang file gamit ang path ng file..?
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Const SW_HIDE As Long = 0
Private Const SW_NORMAL As Long = 1
Private Const SW_MAXIMIZE As Long = 3
Private Const SW_MINIMIZE As Long = 6
'// ShellExecute API.
'// Use Windows file associations to provide the easiest way to
'// process operations > Open, Print,Play or Explore
'// by passing just the FullPathFilename of the item.
Public Function ShellOper(strFileExe As String, _
Optional strOperation As String, _
Optional nShowCmd As Double) As Long
Dim hWndDesk As Long
hWndDesk = GetDesktopWindow()
If Len(strOperation) = 0 Then strOperation = "Open"
If Len(Dir(strFileExe)) = 0 Then
Shell "Explorer.exe /n,/e," & strFileExe, vbNormalFocus
End If
'// Failure >> <=32
ShellOper = ShellExecute(hWndDesk, strOperation, strFileExe, 0, 0, nShowCmd)
If ShellOper <= 32 Then
myMsgBox "Couldn't " & strOperation & " " & strFileExe
End If
Exit Function
ErrH:
ShellOper = -1
End Function
Private Sub imgOpenFiles_Click()
Dim ListCount As Integer
Dim FullPath As String
Dim openRet As Variant
FilePath = FilePath & "\"
ListCount = lvwFolder.ListItems.Count
For i = 1 To ListCount
If lvwFolder.ListItems(i).Checked = True Then
FullPath = FilePath & lvwFolder.ListItems(i).Text
openRet = ShellOper(FullPath)
End If
Next i
End Sub
Private Function InsertUser() As Boolean ' function that insert a user
Dim bReturn As Boolean
Dim strQuery As String
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.ConnectionString = gstrConnectionString
On Error GoTo ERR_LINE
cn.Open
strQuery = "INSERT INTO tblUsers ("
strQuery = strQuery & "UserName, "
strQuery = strQuery & "Password, "
strQuery = strQuery & "FirstName, "
strQuery = strQuery & "LastName, "
strQuery = strQuery & "UserAccess, "
strQuery = strQuery & "Address "
strQuery = strQuery & ")"
strQuery = strQuery & "VALUES "
strQuery = strQuery & "("
strQuery = strQuery & "'" & txtUsername.Text & "', "
strQuery = strQuery & "'" & txtPassword.Text & "', "
strQuery = strQuery & "'" & txtFirstName.Text & "', "
strQuery = strQuery & "'" & txtLastName.Text & "', "
strQuery = strQuery & "'" & cboUserType.Text & "', "
strQuery = strQuery & "'" & txtAddress.Text & "'"
strQuery = strQuery & ")"
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandText = strQuery
cmd.CommandType = adCmdText
Dim n As Integer
cmd.Execute n
If n = 1 Then
bReturn = True
MsgBox "User was Added"
Else
bReturn = False
MsgBox "User was not Added"
End If
ERR_RESUME:
cn.Close
Set cn = Nothing
InsertUser = bReturn
Exit Function
ERR_LINE:
bReturn = False
MsgBox Err.Description
Resume ERR_RESUME
End Function
code
boss, help naman.., napagana ko na to dun sa isang program.. gumagawa ulit ako ng bago..
nag syntx error in INSERT INTO statement .., nung dinebug ko dun nag eeror sa cmd.execute ...ano kaya problema... pati ung UPDATE error din...
code
boss, help naman.., napagana ko na to dun sa isang program.. gumagawa ulit ako ng bago..
nag syntx error in INSERT INTO statement .., nung dinebug ko dun nag eeror sa cmd.execute ...ano kaya problema... pati ung UPDATE error din...