[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How do display an MS Access Ole Object within VB6?

Posted on 2004-08-11
9
Medium Priority
?
1,181 Views
Last Modified: 2013-12-25
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

0
Comment
Question by:RUSS_EMI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 14

Expert Comment

by:Farzad Akbarnejad
ID: 11770208
Hi,
How to verify of selecting the record properly?

-FA
0
 

Author Comment

by:RUSS_EMI
ID: 11770418
it is the correct record because i ask for a match on the key. (fAlpha)
Russ
0
 
LVL 14

Expert Comment

by:Farzad Akbarnejad
ID: 11770437
Please verify the rst.RecordCount. Is it > 0 ?

-FA
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:RUSS_EMI
ID: 11770521
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
 
LVL 14

Accepted Solution

by:
Farzad Akbarnejad earned 2000 total points
ID: 11784197
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
 

Author Comment

by:RUSS_EMI
ID: 11787445
Thanks.  I'll try that tomorrow and get back to you.
Russ
0
 
LVL 14

Expert Comment

by:Farzad Akbarnejad
ID: 11988088
Are you solev your problem. You can post your comment here if you don't solve it yet.

Thanks
-FA
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question