I made a small example:
Set rs_Recordset = New ADODB.Recordset
str_Sql = "select * from tbl_MyTable"
str_Sql = str_Sql & " where (selectData = '" & !MyDbField & "')"
rs_Recordset.Open str_Sql, cn_MyDataBase, adOpenDynamic, adLockOptimistic
If Not (rs_Recordset.BOF And rs_Recordset.EOF) Then...
In human language, because I don't have an example at hand.
Define a recordset and a "SQL select" command and open it.
Check for the recordset NOT to be ".BOF AND .EOF", which would mean there are no records.
Use movefirst to go to the first record of the recordset.
Loop over the records in the...
VB6 runs very well on a Windows 7 or 10 machine. So you could install the VB environment on the newer Windows if you want.
I would suggest you do install it on your computer, be it a Windows 7 or 10, that doesn't matter.
Just make sure you have all components you need in the right spot.
I have...
Emily,
I'm using a mySQL database too from within VB through ADO.
This is the connectionstring I'm using:
Provider=MSDASQL;Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Option=131072;Uid=MyID;Pwd=MyPWD;Database=myDB
As you can see the option is quite different from what you are...
Use errortrapping.
Not all controls have the same properties and methods.
There must be a contyrol on your form/frame that doesn't support the statement you're using.
When you debug the code, you will be able to determine which control is generating the error by using a watch on ctl.
I met with...
BiggerBrother, the machine you are using vbSendMail on does not have to have an e-mail account set up. The mailserver does. You can use any account that is known on the mailserver from any machine that is connected to it.
I use vbSendMail on a server where there is not one e-mail account...
To TheVampire:
vbSendMail does NOT use Outlook. It is a standalone dll for e-mailing.
To Sophie19:
You could use rtf-formatting in a richtextbox and then transfer the contents of the rtbox to Outlook's bodytext.
Or, you could try using html-formatting.
Outlook supports both rtf and html.
The...
I see you declared the subs:
Private Sub poSendMail_SendSuccesful()
MsgBox ("Mail Sent OK!")
End Sub
Private Sub poSendMail_SendFailed(Explanation As String)
MsgBox ("Mail Failed!" & vbCrLf & Explanation)
End Sub
Try declaring those as well:
Private Sub...
I agree with StuH. I also use the vbsendmail.dll and it works like a well oiled machine! You can send mails in ascii or html format, with or without attachments, to a single or to multiple addressees. Good stuff!
Merlin is the name, and logic is my game...
Maybe the soft that creates the file also maintains a parameter file where it stores the width of each field. If you can find and read that parameter file, you can use the sample app replacing the fixed lengths with the ones found in the parameter file. Just a thought.
I did the same trick with...
Oh yes, don't forget to set the batch-file properties to close the window when finished. Otherwise you end up with some instances of the batch-file, all ended, on your taskbar.
Merlin is the name, and logic is my game...
I allso have my last version of the program on the server in a shared directory. But to prevent locking by any user, I don't let them run the program of the server, but I use a batch-file (remember DOS?) to copy the exe-file from the server IF a newer version than the current is found.
That way...
Check if you have administrator rights.
When installing, some registration activities need admin rights. Install for all users, so that all ocx's are availlable for every user.
Hope this solves your problem.
You could do this with an array of tooltips.
If you have some sort of id number in the grid starting from 0 or 1, you could add the full info into the corresponding array-element. When the pointer moves over the grid, get the id, copy the array-element into the tooltip property and the full info...
fatboy2, that is exactly the reason why I suggested vbSendMail. It is free, can send and receive mails with or without attachments.
I use it in the administration program that I'm extending at work.
Works quite well actually.
Merlijn is the name, and logic is my game...
You could use the vbSendMail.dll
Search the internet for it. It comes with examples.
Very handy if you do NOT use M$-Outlook. Because if you don't, you haven't got outlook.dll.
Merlijn is the name, and logic is my game...
Try this one:
Option Explicit
' Declarations
' ============
Private byt_ColSort As Byte
' Holds the number of the column that was last sorted ascending.
' byt_ColSort can have a value from zero to 255,
' so the sub can handle up to 255 columns.
' In case more are needed, change the type to...
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.