System.Diagnostics.Process.GetCurrentProcess.Id matches the value in Windows Task Manager.
I figured it out.
In VB6 I declared as a long:
Private Declare Function GetCurrentProcessId Lib "Kernel32" () As Long
But in VB.NET I need to change it to integer:
Private Declare Function...
How is the "System.Diagnostics.Process.GetCurrentProcess.Id" different from the GetCurrentProcessId API (Kernel32.dll)?
I'm trying to convert code from VB6 to VB.NET and supposedly GetCurrentProcess.Id (.NET) is the equivalent of GetCurrentProcessId API, but it doesn't work. I placed both in my...
You could create your own sum of 30% formula and name it whatever you want.
The formula would be something using the following
Sum(field,fieldcondition)
John Borges
Try opening the file while already open and get the error number. Then create an error handler for that error number that tells you that the file is open.
John Borges
The query string should be,
strSQL = "SELECT * FROM Compounds WHERE StockID = " & Me.CboStocks.Value & " AND SpecNumber = " & Me.CboSpecs.Value
I hope this helps
John Borges
Try for connection string something like this,
cnn.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=dbname;User Id=admin;Password=pass;"
John Borges
You need to add
Dim ConnString as string
with the other variables.
On your connection string "Data Source=Library.mdb" should be a path like "C:\something\Library.mdb"
Also, I noticed some of your field names have spaces.
So, make sure you place them in square brackets
[Book Author]
[Book...
All of the code would go under the following,
Private Sub NameOfYourButtonHere_Click()
'code here
End Sub
Please explain, I'm a bit confused.
John Borges
I tried the following
Like "[a-z]#[a-z] #[a-z]#"
and it works as it should.
Make sure 'Like' is included and don't forget the double quotes.
John Borges
Try something like this:
Dim ADOCn As ADODB.Connection
Dim adoRS As ADODB.Recordset
Dim sSQL As String
Dim sWhere as string
Dim varValue as variant
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\YourDB.mdb;"
Set ADOCn = New ADODB.Connection
ADOCn.Open ConnString
Set...
If the query which your form is based on only shows 'Complete' = False or 'ExpectedCompletionDate' <= Date, then create a recordset of the query and check if there are any records, if not then the form can be closed.
John Borges
Try something like this,
Dim strSQL as string
Dim x as long
Dim lngTicketID as long
For x = 0 To Me.GroupBox.ListCount - 1
If Me.GroupBox.Selected(x) = True Then
lngTicketID = Me.GroupBox.Itemdata(x)
strSQL = "DELETE * FROM tblTickets "
strSQL = strSQL & "WHERE TicketID=" &...
My guess is that your code is sending keys, but it is sending them too soon, before your application is fully ready. Try to add code to wait a few seconds to make sure the application is fully ready. Something like this,
WshShell.Sleep 5000
this will wait for 5 seconds.
Place it before the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.