Data Bound Controls in VBA??

T

Trip

In VB 6.0 the intrinsic controls are data-bound. For example, a text
box has the .DataSource property which allows you to bind the box to a
data control on the same form.

I have installed VB 6.0 on this computer and copied over all of the
same references, yet, I'm not able to find a data-bound text box. If I
type TextBox1.DataSource = "whatever" in lower-case letters they are
appropriately capitalized as though the .DataSource property is
recognized, but when I try to run the code I get a "Method or Data
Member not found" error pointing to the ".DataSouce" code.

How can I get a TextBox to work with an Adodc data control?? Is there
another data control to use?

Overall, I need to set-up a data control which will allow users to Add,
Delete, and Edit data resding in an Access dB. Any suggestions would
be great (links to examples would be great too). Or, should I just do
it in VB 6.0 and make a call to the resulting external app?

Thanks!

Trip
 
L

Leith Ross

Hello Trip,

In VB (Visual Basic) you have a .DataSource property for a TextBox. In
VBA (Visual Basic for Applications) the TextBox has a .ControlSource
property.

It's not clear to me if you are mixing the two languages together or
not. If you have questions about objects in VBA, use the Object Browser
in the Editor to see the Properties, Methods, and Events for a
particular VBA Object. Hope this helps you a little.

Sincerely,
Leith Ross
 
T

Trip

Thanks Leith, I appreciate the reply! However, I don't seem to be able
to bind a textbox1 to a dB datasource such as an Adodc1 data control or
even a recordset or recordset!FieldName. Do you know of any syntax
which would allow for this??

Thanks again!

Trip
 
L

Leith Ross

Hello Trip,

You may want to use SQL to access the recordsets and use VBA to move
and manipulate the data once Access has it. VBA has recordset handling,
but you will most likely need to add a reference to the ADO object
library to call the functions. This is an area I myself am new to. You
may want to post your questions on an Access newsite, since this more
related to Access than Excel.

Sincerely,
Leith Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top