How do display an MS Access Ole Object within VB6?

Simple.  But I'm missing something.  Please help correct my code.  I have Ole1 object control on the form.  Here is my code so far;

sSQL1 = "SELECT * FROM Employees WHERE Employees.fkAlpha = " + "'" + Me.FkAlpha2 + "'"

   Set DB = OpenDatabase("c:\employees.mdb")
   Set rst = DB.OpenRecordset(sSQL1)
   rst.MoveLast
   rst.MoveFirst
   MsgBox rst!Name
   
The record is being selected properly.  rst!Name does display.
Thanks,
Russ

RUSS_EMIAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Farzad AkbarnejadConnect With a Mentor DeveloperCommented:
I think that you can add a Data Control to your Forms. Also add an OLE control to your form. Both are intrinsic control in your ToolBox Window. Now set the data control to you DB and set the Datasourse and DataField of your OLE Control.

Thanks
-FA
0
 
Farzad AkbarnejadDeveloperCommented:
Hi,
How to verify of selecting the record properly?

-FA
0
 
RUSS_EMIAuthor Commented:
it is the correct record because i ask for a match on the key. (fAlpha)
Russ
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Farzad AkbarnejadDeveloperCommented:
Please verify the rst.RecordCount. Is it > 0 ?

-FA
0
 
RUSS_EMIAuthor Commented:
Yes it is.  I have the record.  I can display rst.RecordCount (1) with MsgBox; Text1,text; etc.  Please how do I display the Ole1 control.  I would like to display the Ole Object in MS Access, the field name is "Picture".
Russ
0
 
RUSS_EMIAuthor Commented:
Thanks.  I'll try that tomorrow and get back to you.
Russ
0
 
Farzad AkbarnejadDeveloperCommented:
Are you solev your problem. You can post your comment here if you don't solve it yet.

Thanks
-FA
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.