|
-
September 13th, 2001, 05:40 AM
#1
inserting .gif image
i have a form with a text box on and would like to insert an image into it providing that the correct 4 digit number is typed in to the same textbox to start with. if the wrong 4 digit number is typed in, a msgbox to appear with a msg to say so, please help as this is very frustrating for a beginner like myself
thanx in advance
Thanks in advance for any help in this matter
-
September 13th, 2001, 06:55 AM
#2
Re: inserting .gif image
You can do this using a richtextbox control. Regular textboxes do not allow you to insert objects.
private Sub RichTextBox1_Change()
If len(RichTextBox1.Text) = 4 then
If Left(RichTextBox1.Text, 4) = "1234" then
RichTextBox1.SelStart = 0
RichTextBox1.SelLength = 4
RichTextBox1.OLEObjects.Add Source:="c:\1234.bmp"
RichTextBox1.SelStart = 1
End If
End If
End Sub
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 13th, 2001, 10:15 AM
#3
Re: inserting .gif image
Thanx for the solution, but there is only one snag, i don't think i can use a richtextbox control in access 97 which is the application that i am using for the rest of my project.
is there a way i can manipulate it for use with access?
Thanks in advance for any help in this matter
-
September 13th, 2001, 03:39 PM
#4
Re: inserting .gif image
You can use the richtextbox control in Access
On your workset (the thing with all the controls on), there's a button called 'more controls', when you press this, a list will pop up. Scrool down until you get to 'Microsoft Rich Textbox', select it, and drag it into the form
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 14th, 2001, 03:16 AM
#5
Re: inserting .gif image
so obvious when someone tells you, thanks very much for your help

Thanks in advance for any help in this matter
-
November 28th, 2001, 03:23 PM
#6
Re: inserting .gif image
I got a question on adding OLEObjects. When I do the following,
RichTextBox1.OLEObjects.Add Source:="c:\1234.bmp"
I got a shaking of the user interface and I can't
figure it why and can't figure a way to avoid it.
Any suggestions?
Thanks
Alex Zhu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|