Hey,
I've got the following problem.
I've got a program written in C that receives a character buffer and i've got a Visual Basic program that can transform plain tekst into an image (an .tif file ).
The buffer that my C program receives needs to be converted to an image file so want my C...
My program is giving the following error:
Run-time error '5':
Invalid procedure call or argument
It happens when in the following code:
Private Function GetImage() As Picture
Dim BinaryData() As Byte
Dim mstream As ADODB.Stream
Dim pb As PropertyBag
Dim picPicture As...
Unfortunatly not.
.SenderName is read-only
and .SentOnBehalfOfName can only be used
in combination with the adressbook.
But since i have no access to the adressbook
that's not an option either. I love work.
I can just sit and look at it for hours.
First goto:
Project --> References
then select Microsoft Scripting Runtime
Then in your code add the following
Dim objFso as new FileSystemObject
Dim objTxtStr as TextStream
Dim strFileContent as String
set objTxtStr = objFso.OpenTextFile(your filename)
Do while not (objTxtStr.AtEndOfStream)...
Hi,
I've got a question.
What do i need to change in my code so that when my program sends a mail, the recipient will see my programs name by From instead of my name
This is my code:
Sub SendMail(strEmail As String, intResultaat As Integer)
Dim olApp As New Outlook.Application
Dim olNs...
I can use 2 printers.
If i want to print with VB it automaticly uses my default printer, but i want to use the other one.
How do i change this? I love work.
I can just sit and look at it for hours.
Lol, that was my first intention.
But some field have to be calculated in a way that reports can't handle. So i had no other option then to use forms. I love work.
I can just sit and look at it for hours.
Is it possible to make your own print queue?
I've made a form that can't be printed the normal way.
If i want to print out all records i have to do the following:
DoCmd.PrintOut acSelection
DoCmd.GoToRecord , , acNext
I've got 51 records, so in this case it means i've got 51 print jobs. I'd...
The code is fine.
Check if the names in your combobox are exactly the same as the fieldnames of your table.
Have you tried selecting every value from your first combobox? I love work.
I can just sit and look at it for hours.
I figured out what the problem was.
I had to set the timerinterval to zero before i started printing.
I love work.
I can just sit and look at it for hours.
Let me rephrase the question.
After the line DoCmd.PrintOut acSelection the program has to wait before going futher with the next code line until the page has been printed.
Is this possible?
I love work.
I can just sit and look at it for hours.
I've just gave it a try.
Private Sub ComboBox0_AfterUpdate()
ComboBox2.RowSource = "Select " & ComboBox0.Value & " From tbl_MyTable"
ComboBox2.Value = ComboBox2.ItemData(0)
End Sub
Private Sub ComboBox2_AfterUpdate()
If ComboBox0.Value = "City" Then...
So that means you know which field has what type, right?
So you can make an if statement. Something like this
if ComboBox1.Value <> "City" then
ComboBox3.RowSource = "SELECT * FROM MyTable WHERE " & ComboBox1.Value & " = " & ComboBox2.Value
else...
No problem.
But remember, you can't copy from the combobox when it is invisible. So you'll have to make it visible for a sec to copy it's content, after which you can make it invisible again.
I love work.
I can just sit and look at it for hours.
You could add a textbox to your form that copies it's content from the combobox and make your combobox invisible.
I love work.
I can just sit and look at it for hours.
Oeps. I've been a bit sloppy
It should be
ComboBox3.RowSource = "SELECT * FROM MyTable WHERE " & ComboBox1.Value & " = " & ComboBox2.Value
And there's a restriction to this solution. All the fields have to be of the same type.
(If the type is text it should be like this...
Are the fieldnames in you table the same as the names you show in your first combobox?
If so:
ComboBox2.RowSourceType = "Table/query"
ComboBox2.RowSource = "SELECT " & ComboBox1.Value & "FROM MyTable"
ComboBox3.RowSourceType = "Table/query"...
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.